Hi seanoshea, i am having similair problem. I don't want to use any flash in my application. So i've deicided to use a normal Google Map Api like the Roadfinder.air which is much better than flex, google map api for flash and specially the combination of them both. But i can't find any information about obtaining a valid google map api key for normal html, javascript google map in an air application. The entire world is talking about Google Map api for Flash and Flex (i am using Aptana for air development). I've tried to add uri and url parameters in the script tag you get from google code but so far no luck. I really want to know, how the developer of the roadfinder application has solved this.
On 24 aug, 17:37, seanoshea <[email protected]> wrote: > Hi all, > > I still haven't had any luck in communicating between a remotely > loaded .swf containing myGoogleMaps logic andJavaScriptin anAIR > application - seehttp://forums.adobe.com/message/2200023for more > details on where I'm stuck. > > I'd really like to use the Flash APIs forGoogleMaps, but its looking > increasingly difficult to accomplish what I'm trying to achieve - I'm > new to Flash development, so it could easily be something brainless on > my part which is holding me back. Getting a definitive answer on > whether what I'm trying to do is possible/recommended would help a > lot. > > As an alternative to Flash APIs forGoogleMaps, I've been taking a > look at the RoadFinderAIRapplication demo > (seehttp://labs.adobe.com/technologies/air/samples/for more details). > This example is entirelyJavaScriptbased and looks to be a workable > alternative to Flash. The question I have to this group is whether the > implementation outlined in this RoadFinder demo is advisable from aGoogleMaps > perspective (note to group moderator: if you think this > question is outside the scope of this particular group as it doesn't > relate directly to Flash APIs forGoogleMaps, please let me know and > I'll post to theGoogleMaps group). > > Thanks > > Sean > > On Aug 14, 5:09 pm, seanoshea <[email protected]> wrote: > > > Hi Marc, > > > Had a second look at your instructions and looks like I was barking up > > the wrong tree. I have it working now, by pointing myHTMLat a live > > server and changing from a WidowedApplication to a straight > > Application. This is what my final configuration looks like: > > > <htmlxmlns="http://www.w3.org/1999/xhtml"> > > <head> > > <meta http-equiv="Content-Type" content="text/html; > > charset=UTF-8" / > > > <title>GMAPS</title> > > </head> > > <body> > > <div id="map_canvas" name="map_canvas"> > > <object > > > > classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" > > > > codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/ > > swflash.cab#version=6,0,29,0" > > width="800px" > > height="600px"> > > <param name="movie" > > value="http://myserver.eye.fi/ > > GMapsController.swf"> > > <param name="quality" value="high"> > > <param name="flashVars" > > value="key=ABQIAAAAirgZjEoCu9f3suq95spKkBR_S1ecsaBoILwOJWQZL62AsG_vrBT--- > > yI8NYfu5nSGRvZPcpZobSHzA"> > > <embed > > width="800px" > > height="600px" > > quality="high" > > > flashVars="key=ABQIAAAAirgZjEoCu9f3suq95spKkBR_S1ecsaBoILwOJWQZL62AsG_vrBT--- > > yI8NYfu5nSGRvZPcpZobSHzA" > > > > pluginspage="http://www.macromedia.com/go/getflashplayer" > > type="application/x-shockwave-flash"> > > </object> > > </div> > > </body> > > </html> > > > and my .mxml file looks like: > > > <?xml version="1.0" encoding="utf-8"?> > > <mx:Application xmlns:mx="http://www.adobe.com/2006/mxml" > > layout="absolute"> > > <maps:Mapxmlns:maps="com.google.maps.*" id="map" > > mapevent_mapready="onMapReady(event)" width="100%" height="100%" > > url="http://code.google.com/apis/maps/" > >key="ABQIAAAAirgZjEoCu9f3suq95spKkBR_S1ecsaBoILwOJWQZL62AsG_vrBT--- > > yI8NYfu5nSGRvZPcpZobSHzA"/> > > <mx:Script> > > <![CDATA[ > > > import com.google.maps.LatLng; > > import com.google.maps.Map; > > import com.google.maps.MapEvent; > > import com.google.maps.MapType; > > > private function onMapReady(event:Event):void { > > this.map.setCenter(new > > LatLng(40.736072,-73.992062), 14, > > MapType.NORMAL_MAP_TYPE); > > } > > > public function setLocation(lat:Number, > > long:Number):void { > > > } > > > ]]> > > </mx:Script> > > </mx:Application> > > > Curious to know from theGooglepeople on this list what the thinking > > is behind these restrictions. I'd like to be able to host the .swf > > file internally in theAIRapplication so I wouldn't have to rely on > > an external server (other than theGoogleMaps servers). Would you > > suggest any kind of workaround to achieve what I want? Do you think > > what I want is realistic/possible/advisable? > > > Thanks again > > > Sean > > > On Aug 3, 8:33 am, seanoshea <[email protected]> wrote: > > > > Hi Marc, > > > > Tried your suggestions, but no dice. Tried changing theAIRapp from a > > > WindowedApplication into a regular Application, but didn't have any > > > luck with that. > > > > I tried adding the .swf as the content in theAIR.xml file like this: > > > > <content>GMapsController.swf</content> > > > > and that loaded theGoogleMapas expected - unfortunately, this > > > doesn't really suit myHTMLbased application :( > > > > I posted to theAdobeAIRforums just to see what I'm trying to do is > > > actually possible:http://forums.adobe.com/thread/470957. I'm very new > > > toAIR/Flex development in general, so I could be making a very simple > > > mistake. If someone on theAIRteam posts to theAdobeforums, I'll be > > > sure to repost back here. In the meantime, If anyone on this forum > > > sees something glaringly wrong with what I'm attempting to do, I'd > > > really appreciate it if you could point me in the correct direction. > > > > Cheers > > > > Sean > > > > On Jul 31, 4:25 am, Marc Sutton <[email protected]> wrote: > > > > > Hi Sean, > > > > > So I would change the line below in thehtml: > > > > > height="600px"> > > > > - <param name="movie" value="app:/GMapsController.swf"> > > > > + <param name="movie" value="http://someserver.com/ > > > > GMapsController.swf"> > > > > <param name="quality" value="high"> > > > > > And make sure thekeyis set to match that domain. Also you might have > > > > to change from WindowedApplication to Application to get it to display > > > > at all (possibly changing to a flex profile but I think theair > > > > profile worked as well). > > > > > It's not very elegant, it would be much better if we could use an > > > > app:/ url to store the swf inside theAirapplication but looking at > > > > the network traffic the url parameter in the mxml is always ignored by > > > > the mapsAPIif you aren't running the swf as the main window in > > > > anAirapplication (i.e. it never gets used if you are running > > > > anAir/htmlapplication). > > > > > Love the eye-fi btw, > > > > > -- > > > > Marc Suttonwww.codev.co.uk > > > > > On Jul 30, 10:57 pm, seanoshea <[email protected]> wrote: > > > > > > Hi Marc, > > > > > > I'm running into the exact same issue you seemed to have overcome. > > > > > I've aHTMLbasedAIRapplication and I want to include GMaps > > > > > capabilities in a swf file within theHTMLapp. Would you mind posting > > > > > the code you used to import the swf into theHTMLplease? This is what > > > > > my import code looks like: > > > > > > <object > > > > > classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" > > > > > codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/ > > > > > swflash.cab#version=6,0,29,0" > > > > > width="800px" > > > > > height="600px"> > > > > > <param name="movie" value="app:/GMapsController.swf"> > > > > > <param name="quality" value="high"> > > > > > <param name="flashVars" > > > > > value="key=aklsjdlkasjdlaskjdaslkjdaslkdjalksdjaslkdjaslkdjaslkdjaslkdjasldkjasldkjasldkjaldkajaslkdjasldkjasldkjasldkj"> > > > > > <embed > > > > > width="800px" > > > > > height="600px" > > > > > src="app:/GMapsController.swf" > > > > > quality="high" > > > > > > flashVars="key=aklsjdlkasjdlaskjdaslkjdaslkdjalksdjaslkdjaslkdjaslkdjaslkdjasldkjasldkjasldkjaldkajaslkdjasldkjasldkjasldkj" > > > > > pluginspage="http://www.macromedia.com/go/getflashplayer" > > > > > type="application/x-shockwave-flash"> > > > > > </object> > > > > > > and this is what my mxml code looks like: > > > > > > <mx:WindowedApplication xmlns:mx="http://www.adobe.com/2006/mxml" > > > > > layout="absolute"> > > > > > <maps:Mapxmlns:maps="com.google.maps.*" id="map" > > > > > mapevent_mapready="onMapReady(event)" width="100%" height="100%" > > > > > url="http://code.google.com/apis/maps/" > > > > >key="aklsjdlkasjdlaskjdaslkjdaslkdjalksdjaslkdjaslkdjaslkdjaslkdjasldkjasldkjasldkjaldkajaslkdjasldkjasldkjasldkj"/ > > > > > > <mx:Script> > > > > > <![CDATA[ > > > > > > import com.google.maps.LatLng; > > > > > import com.google.maps.Map; > > > > > import com.google.maps.MapEvent; > > > > > import com.google.maps.MapType; > > > > > > private function onMapReady(event:Event):void { > > > > > this.map.setCenter(new > > > > > LatLng(40.736072,-73.992062), 14, > > > > > MapType.NORMAL_MAP_TYPE); > > > > > } > > > > > > public function > > ... > > meer lezen » --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Google Maps API For Flash" group. To post to this group, send email to [email protected] To unsubscribe from this group, send email to [email protected] For more options, visit this group at http://groups.google.com/group/google-maps-api-for-flash?hl=en -~----------~----~----~----~------~----~------~--~---
