Multi-level markers using Google Maps for Flash

September 30, 2008 · 0 min · admin

Adding custom info windows to Google Maps in Flex

I just tried to create a custom info window for a Google Map using the Google Maps API For Flash. Unfortunately it does not seem to work as expected by setting the customContent property in an object of type InfoWindowOptions. Therefore I wrote this little workaround that creates a popup window: private function createInfoWindow(map:Map, marker:Marker, infoWindow:Class):IFlexDisplayObject { var popup:IFlexDisplayObject = PopUpManager.createPopUp(map, infoWindow); var globalPos:Point = map.localToGlobal(map.fromLatLngToViewport(marker.getLatLng())); popup.move(globalPos.x - popup.width/2, globalPos.y - popup....

August 20, 2008 · 1 min · admin