Has anyone encountered a problem like the one on this map:
http://www.technearchitects.com/testing/projects.html
I'm loading a custom marker and when you click it, a custom info
Window loads, but the map re-centers somewhere over Antarctica!
If you pan back up to the marker, you can close and reopen the info
Window just fine.
Here's the script:
function onMapReady(event:MapEvent):void {
map.enableScrollWheelZoom();
map.enableContinuousZoom();
map.addControl(new ZoomControl());
map.addControl(new PositionControl());
templateMarker();
}
function templateMarker():void {
var markerLoader:Loader = new Loader();
var windowLoader:Loader = new Loader();
var mtempOptions:MarkerOptions = new MarkerOptions({
icon: markerLoader,
hasShadow: false,
draggable: false,
tooltip: "custom marker",
iconAlignment: MarkerOptions.ALIGN_LEFT +
MarkerOptions.ALIGN_BOTTOM});
var mtempPoint:LatLng = new LatLng(41.5123, -81.599400);
var markerLocal:Marker = new Marker(mtempPoint, mtempOptions);
markerLoader.load(new URLRequest("red_marker.swf"));
map.addOverlay(markerLocal);
markerLocal.addEventListener(MapMouseEvent.CLICK, function
(e:MapMouseEvent):void {
markerLocal.openInfoWindow(new InfoWindowOptions({
customContent: windowLoader,
drawDefaultFrame: false,
hasShadow: false,
customCloseRect: new Rectangle(170, 5, 10, 10),
customOffset: new Point(15, 110)}));
windowLoader.load(new URLRequest("info_window.swf"));
});
}
--
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.