Topic: Custom URL To GeoServer
Hi,
I'm trying to use Online Maps with one of our GeoServer instances and though it has a TMS service it seems that the Bing/Google standard isn't actually OGC standard. It seems that the Bing/Google method assumes top left is 0,0 whereas the OGC standard is that 0,0 is bottom left.
To work around this I've applied this fix to OnlineMapsTiles.cs:
https://alastaira.wordpress.com/2011/07 … ordinates/
private string CustomProviderReplaceToken(Match match)
{
string v = match.Value.ToLower().Trim('{', '}');
if (v == "zoom") return zoom.ToString();
if (v == "x") return x.ToString();
if (v == "y")
{
var ymax = 1 << zoom;
var tempy = ymax - y - 1;
return tempy.ToString();
}
if (v == "quad") return OnlineMapsUtils.TileToQuadKey(x, y, zoom);
return v;
}
The problem is that it seems that Lat/Lng are now 180deg out so when I specify 0,0 (lat, lng) it moves the map off the coast of South America rather than Africa.
Do you have any examples of connecting to GeoServer please or suggestions where to look next?
Thanks,
Keegan