flex mobile project : add zoom controls on google map
I am developing a google map appl开发者_开发百科ication 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
I know that this is possible in JavaScript API...
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);
}
精彩评论