Local map provider units

Topics: General, Help
Sep 21, 2012 at 12:47 PM

First I would like to say that GMaps is wonderful, thank you for all the work and making it available for free.

Some users of my application will not be able to have internet access due to security reasons. Due to the amount of data involved I don’t want to prefetch the maps. Therefore I have setup my own OSM map server (ms4w) locally and wish to use that to render the maps.
I’ve got the server working and am now looking at creating my own MapProvider type. The problem is my server expects the tile location requests to be in degrees (longitude / latitude) and the zoom to be either an extent in degrees or a scale (e.g. 1:24000).
Having looked at the positions and zoom in the demo applications they are obviously using some other units. What units are being used? Is there any functionality in the GMaps to convert they into degrees?

Thank you


Sep 21, 2012 at 12:54 PM

can't you configure the server to simpler units?

Sep 21, 2012 at 1:13 PM

Thank you for the fast reply.

I would have thought that longitude / latitude were simple units for a map.

My map server uses the same units as used in the map "shape" files, I obtained those from http://download.geofabrik.de/osm/europe/.
If I knew what units GMaps expects I could try to find more suitable shape files or convert the units.

So the original question still stands, what units is GMaps using or do you know of a source of shape file using the correct units?



Sep 21, 2012 at 1:21 PM

it uses image tiles, standart mercator projection is prefered

Sep 21, 2012 at 1:50 PM

But what are the units? a mercator projection still needs two co-ordinates (in degrees or radians).

Surely there is something in GMaps that can do the conversion, its possible to specify the centre of the map in the demo applications as a longitude / latitude value, this must be converted into whatever units are used to get the image tiles. What I will need for the location would be the reverse of this conversion.

Sep 21, 2012 at 2:32 PM

coordinates are not your problem, make the tiles, don't care for the rest

Sep 21, 2012 at 2:52 PM

I can make the tiles, the problem is what area the tiles are for.

I need to convert GMap's co-ordinates / zoom level into the longitude / latitude to be rendered on the tile.

Sep 21, 2012 at 3:20 PM

some people use geoserver to generate the tiles