Skip to main content
Participant
September 1, 2012
Question

Map (ios and Android)

  • September 1, 2012
  • 9 replies
  • 6326 views

Hi at all,

i need to build an ios/Android application that work with Map and Show Marker on that map.

Can anyone point me in right direction?
Can i Embedd an good service that work with Android and Ios?

D.

This topic has been closed for replies.

9 replies

Inspiring
November 21, 2012

hello im trying to figure how to launch the native iOS Maps from within my app. This was easily possible when Google was used as the backend to Maps, using navigateToURL to a google maps link,  but now they are not in iOS6 and this solution just opens the map in safari at a google page. Of course Map intergration with native extension is ideal, but until then launching the Maps seperartly will, any suggestion, i've searched all over then internet is what ive been doing pre iOS6.

Legend
November 29, 2012
Inspiring
November 29, 2012

YES, I cant beleive it was that simple. Thank you very much.

Inspiring
September 3, 2012

This is an example of maps with marker for geolocation

import flash.display.Loader;

import flash.net.URLRequest;

import flash.sensors.Geolocation;

const GOOGLE_URL:String = "http://maps.google.com/maps/api/staticmap?";

var geolocation:Geolocation = new Geolocation();

geolocation.addEventListener(GeolocationEvent.UPDATE, onTravel);

function onTravel(event:GeolocationEvent):void

{

    geolocation.removeEventListener(GeolocationEvent.UPDATE, onTravel);

    loadStaticImage(event.latitude, event.longitude);

}

function loadStaticImage(lat:Number, long:Number):void

{

    var width:int = Math.min(640,stage.stageWidth);

    var height:int = Math.min(640,stage.stageHeight);

    var request:String = "markers=size:large|color:blue|label:A|"+ lat + "," + long+ "&zoom=16+ &size=" + width + "x" + height +"&maptype=hybrid&mobile=true&sensor=true";

    var loader:Loader = new Loader();

    loader.contentLoaderInfo.addEventListener(Event.COMPLETE, imageLoaded);

    loader.load(new URLRequest(GOOGLE_URL + request));

}

function imageLoaded(event:Event):void

{

    event.currentTarget.removeEventListener(Event.COMPLETE, imageLoaded);

    addChild(event.currentTarget.content);

}

mbhagya
Participating Frequently
September 2, 2012

The AIR SDK does not have pre-built maps API. You can use either of the following approaches to include maps in your application:

1. Use an actionscript library like Yahoo! maps or Google maps.

2. Use a native extension that utilizes the native maps API on iOS and Android. For more on native extensions, see this. This is a sample maps native extension for iOS.

-mayank

Davdi1982Author
Participant
September 2, 2012

Google Maps and Yahoo is deprecated.

Yahoo Maps is deprecated (http://developer.yahoo.com/flash/maps/).

So I think that the problem is: witch map is not deprecated for Adobe Air (swc) ?

D.

Inspiring
September 2, 2012

I have had very good luck with ModestMaps (http://code.google.com/p/modestmaps/)

We have added a few things on top of MM for our use case, but it all works very well on both Android and iOS.  We have multiple apps published on both platforms that use this library. The library can be used with many different image feeds.

One warning if you do use this library, though.  It has a memory leak that doesn't matter much on desktop, but could definitely pose a problem on mobile.  I have a 1 line fix, but I haven't got around to submitting it to the library devs.  I will make sure to post again in this thread with the fix on Tuesday when I return to work.

Edit: And a second warning... the library has had very little development in the last couple of years, so you're pretty much on your own from what I can tell.  But, you'll have all the source code, so you can fix any issues you find.

Davdi1982Author
Participant
September 2, 2012

No one can discuss about this thread?

D.