hier is code... but infowindow only on one marker.... so I want to make infowindow on both markers and as default opend(if it's possible)
<?xml version="1.0" encoding="utf-8"?> <mx:Application xmlns:mx="http://www.adobe.com/2006/mxml" layout="absolute"> <maps:Map3D xmlns:maps="com.google.maps.*" mapevent_mappreinitialize="onMapPreinitialize(event)" mapevent_mapready="onMapReady(event)" id="map" width="100%" height="100%" key="ABQIAAAA8L7PA6DVZ4iBF69Y- wH1XxTJS7mSMG_76bpXHnj3DLzSC6sgZhQMyuk-p_JMF229R-F0Mr-M89UnMw"/> <mx:HTTPService id="service" url="http://www.adriacro.net/maps/ map.php" result="onResult(event)" /> <mx:Script> <![CDATA[ import com.google.maps.InfoWindowOptions; import com.google.maps.LatLng; import com.google.maps.Map3D; import com.google.maps.MapEvent; import com.google.maps.MapOptions; import com.google.maps.MapType; import com.google.maps.overlays.Marker; import com.google.maps.overlays.MarkerOptions; import com.google.maps.View; import com.google.maps.geom.Attitude; import com.google.maps.controls.NavigationControl; import mx.collections.ArrayCollection; import mx.rpc.events.ResultEvent; import com.google.maps.MapMouseEvent; private function onMapPreinitialize(event:MapEvent):void { var myMapOptions:MapOptions = new MapOptions(); myMapOptions.zoom = 8; myMapOptions.center = new LatLng(42.6501, 18.1055); myMapOptions.mapType = MapType.NORMAL_MAP_TYPE; myMapOptions.viewMode = View.VIEWMODE_PERSPECTIVE; myMapOptions.attitude = new Attitude(15,70,0); map.setInitOptions(myMapOptions); getMemory(); } private function onMapReady(event:MapEvent):void { this.map.addControl(new NavigationControl()); service.send(); getMemory(); //goMar(); } private function onResult(event:ResultEvent):void { var list:ArrayCollection = event.result.map.loc; for (var i:int = 0; i < list.length; i++) { var m:Marker = new Marker(new LatLng(list[i].lat, list[i].lon), new MarkerOptions( { tooltip:list[i].name } )); //var html:String = list[i].name; //trace(html); var window:InfoWindowOptions = new InfoWindowOptions( { strokeStyle: { color: 0x987654 }, fillStyle: { color: 0x223344, alpha: 0.8 }, contentHTML:list[i].name, width: 200, cornerRadius: 12, padding: 10, hasCloseButton: true, hasTail: true, tailWidth: 20, tailHeight: 30, tailOffset: -12, tailAlign: InfoWindowOptions.ALIGN_LEFT, hasShadow: true }); trace(window); map.addOverlay(m); m.addEventListener(MapMouseEvent.ROLL_OVER, function (event:MapMouseEvent):void { m.openInfoWindow(window); }); //m.openInfoWindow(window); } getMemory(); } private function getMemory():void { var mem:String = Number( System.totalMemory / 1024 / 1024 ).toFixed( 2 ) + 'MB'; trace(mem); } ]]> </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.
