Recent activity
Subscribe to this feed
Yalu asked a question in Modest Maps on February 08, 2008 09:27:
flash cs3 crashesI downloaded the 1.0 version of MM. I tried to compile the Flash CS3 version of the ModestMapSample. Everything works well, but when I close the flash player after testing... Flash CS3 IDE crashes. Anybody else have this problem?-
Yalu started following the idea "Listing markers" in Modest Maps.
-
Yalu started following the idea "Listing markers" in Modest Maps.
-
Yalu started following the idea "Listing markers" in Modest Maps.
Yalu replied on November 05, 2007 07:11 to the idea "zoomTo and PanTo" in Modest Maps:
Hello Pol,
following worked for me...
in com.modestmaps.core.MarkerClip make the updateClips() method public like so...
public function updateClips():Void
{
for(var id:String in __names)
if(this[__names[id]] && this[__names[id]]._visible)
updateClip(id);
}
in the com.modestmaps.Map add this function...
private function updateMarkerClips()
{
__markers.updateClips();
}
in com.modestmaps.Map call updateMarkerClips() method after onPanned call like so...
private function animationProcess(lastType:String):Void
{
if(__animSteps.length) {
var step:Object = __animSteps.shift();
if(step.type == 'pan') {
//grid.allowPainting(__animSteps.length <= 1);
grid.panRight(step.amount.x);
grid.panDown(step.amount.y);
__currentPosition.x += step.amount.x;
__currentPosition.y += step.amount.y;
onPanned(new Point(__currentPosition.x-__startingPosition.x, __currentPosition.y-__startingPosition.y));
updateMarkerClips(); //<--- this line added by yalu
now the markers should update when calling panTo or panUp or other pan methods in com.modestmaps.Map
I am not a pro but this worked for me flawlessly. Hope this works for everybody.
additionally(and optionally) I also made a little change(instead of using centerPoint.x and centerPoint.y-- i used __width/2 and __height/2) to the panTo function like so...
public function panTo (targetLoc:Location):Void {
var targetPoint:Point = locationPoint(targetLoc, grid);
var distance:Point = new Point(Math.round((targetPoint.x - __width / 2) / panFrames), Math.round((targetPoint.y - __height / 2) / panFrames));
panMap(distance);
}
this worked for me more reliably in the use of panTo function.
Regards,
Yalu-
Yalu started following the idea "zoomTo and PanTo" in Modest Maps.
Loading Profile...

