Increase precision when adding markers
Is there anyway to increase the precision when adding markers?
I have it so when a user clicks on the map it adds a marker.
They can also drag on drop that marker on to their map.
I am calling the myMap.map.pointLocation() method to find lon and lat, but this seems to snap to (about) a 30 meter grid.
Is there any way I can increase this precision?
I am using this in Flex3
Cheers,
David
I have it so when a user clicks on the map it adds a marker.
They can also drag on drop that marker on to their map.
I am calling the myMap.map.pointLocation() method to find lon and lat, but this seems to snap to (about) a 30 meter grid.
Is there any way I can increase this precision?
I am using this in Flex3
Cheers,
David
1
person has this question
I have this question, too!
Tell me when someone answers.
The more people who ask this question, the more it gets noticed.
The more people who ask this question, the more it gets noticed.
Create a customer community for your own organization
Plans starting at $19/month
-
Inappropriate?Hmm... we've seen something like this before but I didn't get a chance to look into the root cause of it.
Map.pointLocation calls TileGrid.pointCoordinate to convert a Point into a grid Coordinate, and then hands off to the map provider's projection (usually MercatorProjection) to convert the Coordinate to a Location. It looks like in the current trunk version of Modest Maps the TileGrid will round off the pointCoordinate at the maximum zoom level specified in Coordinate.MAX_ZOOM.
If you're still with me, I think there are two things to try. I think Coordinate.MAX_ZOOM could use bumping up because of the rounding that happens in TileGrid - perhaps try 25 or 26 which should get the accuracy to be under 1m (numerical precision is another matter, but the calculation should be more accurate). The other alternative is to try removing the Math.round calls from line 404/405 of TileGrid.as* and see if that fixes it. I'm not sure what else depends on it though so be careful to test everything else you need!
* http://modestmaps.mapstraction.com/tr...
I’m undecided
The company says
this answers the question
-
Inappropriate?Hi RandomEtc, (do people call you "Ran" for short?)
Awesome!
The only change I made was the Coordinate.MAX_ZOOM to 25 and I am down to 1m precision.
As you say, the bane now is how the actual numbers are handled, but from what I have seen so far this won't be an issue
Thanks for the quick response and great answer!
Keep up the good work
I’m happy
1 person says
this answers the question
Loading Profile...



EMPLOYEE