Get your own customer support community
 

Marker Fix

Hi,
I just started developing with the modest maps as3 trunk.
For my markers (that were MovieClips), the markers were not put on the right location out of the box.
I had to fix the file com.modestmaps.core.MarkerClip.as following to center the markers exactly on the middle of the location:

public function updateClip(marker:DisplayObject):void
{
var location:Location = locations[marker];
var point:Point = map.locationPoint(location, this);

marker.x = point.x - marker.width/2;
marker.y = point.y - marker.height/2;
}

I dont know if this patch is necessary generally or only for my implementation. Maybe it could be helpful for someone else.

Mugdi
 
happy
Inappropriate?
1 person likes this idea

User_default_medium