3 of 3
3
AS3 Google Maps Multi-Touch
Posted: 04 March 2009 12:34 AM   [ Ignore ]   [ # 31 ]
Avatar
RankRank
Joined  2008-02-25
Total Posts:  119
Member

Hey guys, I posted a new thread here about a TUIO enabled modest maps.  Now with smooth scaling!

Parker

Profile
 
 
Posted: 25 August 2009 10:22 PM   [ Ignore ]   [ # 32 ]
Rank
Joined  2009-08-25
Total Posts:  3
New Member

I’ve made a map and added some markers using cyandesign’s “ [New Tutorial] Introduction: Flash Google Maps API and Multi-touch”. Markers work by now with MapMouseEvent with the following code to display an InfoWindow:

marker.addEventListener(MapMouseEvent.CLICK, function(e:Event):void {
marker.openInfoWindow();
}wink;

I’ve tried this code to make it work with TouchEvent, but it doesn’t.

marker.addEventListener(TouchEvent.MOUSE_DOWN, function(evt:TouchEvent):void {
marker.openInfoWindow();
}wink;

I’m not really good at coding. I’m a beginner.
Any idea on how can I make markers work with TouchEvent?
Where am I wrong?

I would really apreciate your help.

Profile
 
 
Posted: 26 August 2009 10:34 AM   [ Ignore ]   [ # 33 ]
Avatar
RankRank
Joined  2008-02-14
Total Posts:  152
Member

hi elmilusos,
when interacting with flash by using a mouse and you want to listen on a mouse click you would just use a code like this:

mySprite.addEventListener(MouseEvent.CLICKdoSomethingFunction);

however, the google maps flash API does not support this standard event. instead they are using this proprietary code as you said:

marker.addEventListener(MapMouseEvent.CLICKdoSomethingFunction);

as the google maps flash API is not open source i cannot see how google implemented this MapMouseEvent thingy. however, the name MapMouseEvent implies that this is an event that is dispatched by the map on the marker when the map is being clicked and not by the marker itself. anyway, i have no workaround for this.

however, i found this in another thread on the nuigroup:

the marker icon can be any DisplayObject.  create a DisplayObject of your choice and tell Google Maps to use that as the marker icon through MarkerOptions.  In your new DisplayObject set up the touch events and you should be good to go.

have you tried this already?

cheers,
johannes

 Signature 

_________________________________________________
my personal blog: johannesluderschmidt.de
our touchlib as3 tuio classes enhanced with fiducial support

Profile
 
 
Posted: 30 September 2009 06:50 AM   [ Ignore ]   [ # 34 ]
Avatar
RankRank
Joined  2008-02-14
Total Posts:  152
Member

how to obtain what? google maps as3? here: http://code.google.com/p/mapstouch/

 Signature 

_________________________________________________
my personal blog: johannesluderschmidt.de
our touchlib as3 tuio classes enhanced with fiducial support

Profile
 
 
Posted: 16 March 2011 07:43 AM   [ Ignore ]   [ # 35 ]
Rank
Joined  2010-11-04
Total Posts:  77
New Member

I try to use google map in my appliaction.
I download SDK and copy required map_1_20 in C:\Program Files\Adobe\Adobe Flash CS3\en\Configuration\Components\Google Maps API folder.
Now When I sign up for API key it asks for Website URL
what should be written in it ?
I want to run it locally on my computer.

Profile
 
 
   
3 of 3
3