You are viewing an archive page. Click here to go to the current Open Exhibits website.
Log-in is disabled for the archived site
Software

Software: Modules

Templates allow novices to create their own floor or Web based exhibits. Universal Modules allow more advanced developers to combine, branch, and write their own modules that can act as building blocks for new Exhibits.

Google Maps Viewer

Google Maps Viewer

First Posted: November 15, 2010
v1.0 Updated: November 15, 2010

Project Summary

The GMapViewer is a module that uses the Google Maps API to create an interactive mapping window. Multiple touch object windows can independently display maps with different sizes and orientations. Each map can be centered on different coordinates and use different map types and views.

 

The orientation, coordinates, map type and map tilt can be specified using the module's external XML file. Full documentation of included XML classes can be found under the Properties and Customization tag.

ABOUT THIS CONTRIBUTOR

Profile picture for Paul Lacey

Paul Lacey

Dir Multitouch Engineering
Open Exhibits Staff
RSS Feed

Total Activity:  1K
Downloads:  20
Article Views:  1K
Shared:  1
Tweets:  0

Uploads:  7
Comments:  4
Favorites:  8
Likes:  3
Emails:  0

Profile picture for Libbey White
Libbey White commented
7 years ago
This is a great project, I'm excited to use it! Initial question, though-- I tried opening the gmapViewer SWC file (and others) in Flash CS4 (on Windows 7), and get an "Unexpected file format" error, and it won't open. Is this a known compatibility issue? Would it be possible for you to also export and post a backward-compatible version? Thanks!
Profile picture for Erin Rose
Erin Rose commented
7 years ago
Due to the improved native touch support in CS5, our tutorials are only published for CS5. We apologize for the confusion. You can download a free trial of Adobe CS5 on the Adobe site if you like. Thanks for your interest in Open Exhibits!
Profile picture for Libbey White
Libbey White commented
7 years ago
Thanks, Erin! I didn't realize they had improved support for touch- that's good to know. I'm downloading the trial version.
Profile picture for Libbey White
Libbey White commented
7 years ago
Hi again, I'm now working in CS5, but when I try to re-compile I get the following errors: 1017: The definition of base class Application was not found; 1020: Method marked override must override another method; and 5000: The class 'Main' must subclass 'flash.display.MovieClip' since it is linked to a library symbol of that type. I'm not sure this is the right place to get help with this, but the support link in the ReadMe PDF leads to a 404, so I thought I'd try.
Profile picture for Erin Rose
Erin Rose commented
7 years ago
Hi Libbey - Sorry about the problems you're having! Could you post a support ticket to the module's issue tracking system: http://openexhibits.org/project/issues/gmapviewer, and we'll post our answer to you there. It helps us to keep better track of potential bugs and common issues. Thanks!
Profile picture for Erin Rose
Erin Rose commented
7 years ago
Also, could you copy and paste the broken link in that support ticket? The only support link I found in the PDF was working, and I want to make sure I didn't miss it. Thanks!
Profile picture for Eugene Ch'ng
Eugene Ch'ng commented
7 years ago
Hi Erin, I've got Adobe Flash Pro CS5 and have downloaded the collectionviewer-1.2.zip. Followed your readme pdf and tried to ctrl-enter play the file but gets these errror messages: C:\Users\eugene\Downloads\CollectionViewer-1.2\Main.as, Line 1 5000: The class 'Main' must subclass 'flash.display.MovieClip' since it is linked to a library symbol of that type. C:\Users\eugene\Downloads\CollectionViewer-1.2\Main.as, Line 23 1020: Method marked override must override another method. C:\Users\eugene\Downloads\CollectionViewer-1.2\Main.as, Line 12 1017: The definition of base class Application was not found. Any ideas why? Best wishes Eugene
Profile picture for Eugene Ch'ng
Eugene Ch'ng commented
7 years ago
Erin, I've found the solution! I added the openexhibits .swc core components and it worked ;) btw, I'm applying for a European grant to get a new PhD graduate in multitouch interfaces (or one with 1-2 years of post doc experience) to come over to the UK for 2 years with a pay of 50K euros annual salary, relocation, etc. Any ideas where to get someone like that?
Profile picture for Brian Burnette
Brian Burnette commented
6 years ago

I'm trying to add the map module top a project I'm working on and got the following error when I compile.

D:\...\id\component\GMapDisplay.as, Line 761017: The definition of base class TouchComponent was not found.

Line 1531020: Method marked override must override another method.

Line 2061020: Method marked override must override another method.

 Line 2111020: Method marked override must override another method.

Line 2181020: Method marked override must override another method.

Line 3091020: Method marked override must override another method.

 Line 3501020: Method marked override must override another method.

 

So come to find out for one reason or another id.core.TouchComponent.as missing and I can't seem to find a place to get it. Any ideas if these are related and where I can download that missing core .as?

 

 

Profile picture for Charles Veasey
Charles Veasey commented
Open Exhibits Staff
6 years ago

Download the core here:

http://openexhibits.org/software

click on: Download the SDK

 



Summary

The GMapViewer is a module that uses the Google Maps API to create an interactive mapping application. Multiple touch object windows can independently display maps with different sizes and orientations. Each map can be centered on different coordinates and use different map types and views. The map windows can be moved, scaled and rotated using multitouch gestures. Map type, latitude and longitude, zoom level, attitude and pitch can also be controled using multitouch gestures inside the mapping window. All multitouch gestures can be activated and deactivated using the module XML settings. The Google Maps viewer requires a Google API key. Sign up on the Google Maps API site

Features

  • Multiple independent map windows
  • 3D map gesture controls
  • Flick to change map type
  • Double tap to fly-to location
  • Gab, scale and rotate windows
  • Customize window appearance
  • Configurable gesture interactions

Example Code

Using this

package id.module{

 import flash.events.Event;
 import id.core.TouchComponent;
 import id.component.GMapDisplay;
 import id.element.MapParser;

 public class GMapViewer extends TouchComponent {

 private var mapDisplay:GMapDisplay;
     public function GMapViewer(){

     super();
     MapParser.settingsPath="GMapViewer.xml";        
     MapParser.addEventListener(Event.COMPLETE,onParseComplete);       
   }
     private function onParseComplete(event:Event):void{

         mapDisplay = new GMapDisplay();
         mapDisplay.id = 0;            
         addChild(mapDisplay);
      }    
 
    }
}

Properties and Customization

Included XML tags and functions:

Name Description Notes
<Content> Contains the parameters for each map object populated to the application
<FrameGestures> Sets which gestures can be used to manipulate the frame and the object on stage.
<FrameStyle> Contains the style settings for the map frame.
<GlobalSettings> Contains the global module settings.
<MapGestures> Sets which gestures can be used on the map itself. To avoid confusion, we suggest that if <tilt>, which rotates the map in 3D space, is set to "true", <rotate>, which rotates the map in 2D space, be set to "false."
<Source> Defines each map object populated by the application. Each source must have a unique ID.
<amountToShow> Sets how many map objects are populated on stage at any one time.
<apiKey> Sets the Google Maps API key used by the module. Must be reset to the users unique key.
<cornerRadius> Sets the corner radius for the rounded corners of the frame. To make corners angular, set to "0".
<doubleTap> Sets whether or not the double tap gesture can be used.
<drag> Sets whether or not the drag gesture can be used.
<fillColor1> Sets the color of the frame.
<flick> Sets whether or not the flick gesture can be used.
<frameDraw> Sets whether or not a frame is drawn around the map objects.
<initialAttitude> Sets how the map is rotated at launch relative to the frame
<initialTilt> Sets the map tilt at launch relative to the frame.
<initialType> Sets the style of the map view at launch. 0 is satellite, 1 is hybrid, 2 is street view map, 3 is terrain
<initialZoom> Sets the initial zoom level of the map.
<latitude> Defines the map object latitude.
<longitude> Defines the map object longitude.
<mapHeight> Sets the height of the map window in pixels.
<mapRotation> Sets how the map object is rotated when it is placed on the stage.
<mapWidth> Sets the width of the map window in pixels.
<outlineAlpha> Sets the opacity of the frame outline.
<outlineColor> Sets the color of the frame outline.
<outlineStroke> Sets the size of the frame outline in pixels.
<padding> Sets the width in pixels of the frame.
<rotate> Sets whether or not the rotate gesture can be used.
<scale> Sets whether or not the scale gesture can be used.
<tilt> Sets whether or not the tilt gesture can be used.
<zoomStep> Sets the amount by which the zoom augments when the zoom gesture is used.

Included AS3 Classes and customization:

Name Superclass Notes
GmapViewer TouchComponent
Name Type Description Notes
COMPLETE String String utilized for a dispatch event when module has loaded. Public Static
displayObject Array The object holder for the GmapViewer Class. Public
id int The identification number of an object within a module. Public
mapDisplay MapDisplay The main display class for the GmapViewer. Private
moduleName String The module name is the same as its class name. Public
Name Description Notes
GmapViewer() The function called after the module xml has been parsed. Public
callNewObject(int):void The Constructor. Public
onParseComplete(event:Event):void Calls an new object to the stage and passes an int as its argument. Private
updateUI():void Calls to the callNewObject() function. Protected
Name Description Notes

This material is based upon work supported by the National Science Foundation under Grant Number Division of Research on Learning in formal and informal settings #1010028. Any opinions, findings, and conclusions or recommendations expressed in this material are those of the authors and do not necessarily reflect the views of the National Science Foundation.


Open Exhibits was developed by Ideum, makers of GestureWorks. Open Exhibits SDK is free for non-commercial use.

Connect
YouTube Twitter Flickr