[OSM-talk] Mathematic genius needed
andy at britishideas.com
Mon Mar 22 03:29:42 GMT 2010
How about converting to UTM then using a zoom level specified as meters
Here is what I did when printing from Mapnik:
Bernhard zwischenbrugger wrote:
> Hi all
> Maybe that one is easy for someone out there, for me it's unsolvable.
> I have
> minlat, minlon, maxlat, maxlon
> That describes an area in WGS84
> The area should be placed on the screen.
> To place it on the screen, I need the centerlat,centerlng and the zoomlevel.
> To be shorter on that:
> wgs84: minlat, minlon, maxlat, maxlon
> screen: width, height
> lat,lng, center
> At first you maybe think
> centerLat = (minlat + matlat)/2;
> centerLng = (minlng + matlng)/2;
> could be the solution.
> But that does not give the correct result.
> The center must be the center in screen coordinates.
> talk mailing list
> talk at openstreetmap.org
More information about the talk