0 Replies Latest reply on Jun 6, 2011 10:11 PM by takcafe

    Keep google map marker after leaving for another view

    takcafe

      I'm creating a mobile app which displays a google map. You can enter address and put a marker on the map. The problem is when I leave for another view and come back to the original view, that marker is deleted. Is there a way to keep that marker after leaving for another view and coming back to the original view? The easiest solution can be using database, but I do not like to use database if possible.

       

      onMapReady(event) is implemented:

      protected function onMapReady(event:Event):void {

              map.setMapType(MapType.PHYSICAL_MAP_TYPE);

              map.addEventListener(TransformGestureEvent.GESTURE_ZOOM,pinchZoom);

       

              if(Geolocation.isSupported){

                zoomLevel = 12;

                geo = new Geolocation();

                geo.setRequestedUpdateInterval(50);     

                geo.addEventListener(GeolocationEvent.UPDATE,onGeoUpdate);

       

                geocoder = new ClientGeocoder();

                geocoder.addEventListener(GeocodingEvent.GEOCODING_SUCCESS, onGeocodingSuccess);

                geocoder.addEventListener(GeocodingEvent.GEOCODING_FAILURE, onGeocodingFailuer);      

              }

            }

       

      Any help is apprciated.