For a custom infoWindow, I have a component named infoWindowComTEST. It's basically only <mx:canvas width = "125" height = "125"> (but I've also created it as other components).
Clicking the marker brings up the infoWindow. If the dimensions of the infoWindow go off the edge, the map pans appropriately (almost). Anything beyond 100px goes off the edge of the map, to the bottom or right for the code below. Thanks for your help, Here's code that shows the issue: <?xml version="1.0" encoding="utf-8"?> <mx:Application xmlns:mx="http://www.adobe.com/2006/mxml" xmlns:views="views.*" paddingLeft="0" paddingRight="0" > <mx:Script> <![CDATA[ import mx.core.Application; import mx.controls.Alert; import com.google.maps.controls.*; import com.google.maps.LatLng; import com.google.maps.Map import com.google.maps.MapType; import com.google.maps.MapMouseEvent; import com.google.maps.InfoWindowOptions; import com.google.maps.overlays.Marker; import com.google.maps.overlays.MarkerOptions; import views.infoWindowComTEST private function onMapReady(event:Event):void { this.map.setCenter(new LatLng(40,40), 3, MapType.NORMAL_MAP_TYPE); // Include Map Controls map.addControl(new ZoomControl()); map.addControl(new PositionControl()); //map.addControl(new MapTypeControl()); var latlng:LatLng = new LatLng(40, 40); var marker:Marker = createMarker(latlng); map.addOverlay(marker); } public function createMarker(latlng:LatLng): Marker { // create the Marker var marker:Marker = new Marker(latlng); // Click to open the Info Window marker.addEventListener(MapMouseEvent.CLICK, doInfoWindow); // Generate the Info Window function doInfoWindow(e:MapMouseEvent):void { var thisInfoWindow:infoWindowComTEST = new infoWindowComTEST; // Info Window Properties var infoWindowOptions:InfoWindowOptions = new InfoWindowOptions(); infoWindowOptions.width = 150; infoWindowOptions.customContent = thisInfoWindow; marker.openInfoWindow(infoWindowOptions); } return marker; } ]]> </mx:Script> <maps:Map xmlns:maps="com.google.maps.*" id="map" mapevent_mapready="onMapReady(event)" width="100%" height="100%" key=" keyOmitted "/> </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 -~----------~----~----~----~------~----~------~--~---
