Hi, I have been experimenting with the new Map3D features of the Google Maps API for Flash. I especially like the FlyTo option (which works much smoother than the ZoomIn function). For a project that doesn't need the 3D features, I tried to use FlyTo in combination with the 2D view (View.VIEWMODE_2D). My problem is that when I zoom in using FlyTo, the map tiles aren't updated.. This problem doesn't occur when using the View.VIEWMODE_ORTHOGONAL and View.VIEWMODE_PERSPECTIVE modes (but they seem to use a lot more memory, so I'd prefer the real 2D mode). Does anyone if there's a way to solve this issue?
Thanks in advance! Hugo This is an example that shows the issue: <?xml version="1.0" encoding="utf-8"?> <mx:Application xmlns:mx="http://www.adobe.com/2006/mxml" layout="absolute"> <mx:Panel title="Google Maps 3D FlyTo Test (View.VIEWMODE_2D)" width="100%" height="100%"> <mx:VBox width="100%" height="100%"> <mx:HBox width="100%" height="25"> <mx:Button id="submitButton" label="FlyTo Marker" click="doFlyTo(event);" /> </mx:HBox> <maps:Map3D xmlns:maps="com.google.maps.*" mapevent_mappreinitialize="onMapPreinitialize(event)" mapevent_mapready="onMapReady(event)" id="map" key="YOUR_API_KEY" width="100%" height="100%" /> </mx:VBox> </mx:Panel> <mx:Script> <![CDATA[ import com.google.maps.LatLng; import com.google.maps.Map3D; import com.google.maps.MapEvent; import com.google.maps.MapMouseEvent; import com.google.maps.overlays.Marker; import com.google.maps.InfoWindowOptions; import com.google.maps.MapOptions; import com.google.maps.MapType; import com.google.maps.View; import com.google.maps.controls.NavigationControl; import com.google.maps.geom.Attitude; import mx.controls.Alert; private function onMapPreinitialize(event:MapEvent):void { var myMapOptions:MapOptions = new MapOptions; myMapOptions.zoom = 8; myMapOptions.center = new LatLng(51.3872, 4.6787); myMapOptions.mapType = MapType.PHYSICAL_MAP_TYPE; myMapOptions.viewMode = View.VIEWMODE_2D; myMapOptions.attitude = new Attitude(0,0,0); this.map.setInitOptions(myMapOptions); } private function onMapReady(event:MapEvent):void { this.map.addControl(new NavigationControl()); var marker:Marker = new Marker(new LatLng(52.052, 4.735)); marker.addEventListener(MapMouseEvent.CLICK, function (event:MapMouseEvent):void { marker.openInfoWindow(new InfoWindowOptions({content: "click on FlyTo"})); }); map.addOverlay(marker); } private function doFlyTo(event:Event):void { map.flyTo(new LatLng(52.052, 4.735),12,new Attitude(0,0,0),3); } ]]> </mx:Script> </mx:Application> --~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---
