grst / geos

Google Earth Overlay Server - display map overlays in Google Earth
https://grst.github.io/geos
BSD 3-Clause "New" or "Revised" License
42 stars 12 forks source link

Support "<invertYCoordinate>" tag in MapSources for TMS layers #10

Open JSFrias opened 7 years ago

JSFrias commented 7 years ago

Geos doesn't seem to support the "true" tag in the map sources xml file. Is this the case?

This is the conversion (possibly the opposite of what you would need):

def GoogleTile(self, tx, ty, zoom):
    "Converts TMS tile coordinates to Google Tile coordinates"

    # coordinate origin is moved from bottom-left to top-left corner of the extent
    return tx, (2**zoom - 1) - ty

Taken from here: http://www.maptiler.org/google-maps-coordinates-tile-bounds-projection/

grst commented 7 years ago

correct, the <invertYCoordinate> is currently not supported.

I can look into this when I have a little more time, or you can implement it yourself and file a pull request.