2

I am developing a google map application using adobe flex 4.5 . I need to add zoom controls like one we see in android mobile(+,-) to the map. I am using "map_flex_1_20.swc" file. If I use built in zoom controls it is appearing like one we see on desktop or web. please help me to add zoom controls(+,-) like on android device

Prabhu M
  • 3,534
  • 8
  • 48
  • 87
  • hi prabhu see this question http://stackoverflow.com/questions/7964597/how-can-start-mobile-flex-google-map-application-using-adobe-flash-builder-4-5 – Narasimha Nov 01 '11 at 12:37

2 Answers2

1

You just have to call the function in your Event. I'll show you simple Code to doing this. I hope this will help you.

protected function onMapReady(event:MapEvent):void
            {


                    var lat:Number= 30.7500;
                    var long:Number= 76.7800;
                    map.addControl(new ZoomControl());
                    map.addControl(new PositionControl());
                    map.addControl(new MapTypeControl());
                    map.removeMapType(MapType.HYBRID_MAP_TYPE);


                    this.map.setCenter(new LatLng(lat,long), 12, MapType.NORMAL_MAP_TYPE);

        }
Anuj Sharma
  • 4,294
  • 2
  • 37
  • 53
1

I know that this is possible in JavaScript API...

Alexander Farber
  • 21,519
  • 75
  • 241
  • 416