diff --git a/examples/sundials-spherical-mercator.html b/examples/sundials-spherical-mercator.html index b4f5e0b6ee..c7a21f0d77 100644 --- a/examples/sundials-spherical-mercator.html +++ b/examples/sundials-spherical-mercator.html @@ -31,15 +31,7 @@ 20037508.34, 20037508.34) }; map = new OpenLayers.Map('map', options); - var mapnik = new OpenLayers.Layer.TMS( - "OpenStreetMap (Mapnik)", - "http://tile.openstreetmap.org/", - { - type: 'png', getURL: osm_getTileURL, - displayOutsideMaxExtent: true, - attribution: 'OpenStreetMap' - } - ); + var mapnik = new OpenLayers.Layer.OSM("OpenStreetMap (Mapnik)"); var gmap = new OpenLayers.Layer.Google("Google", {sphericalMercator:true}); var sundials = new OpenLayers.Layer.Vector("KML", { projection: map.displayProjection, @@ -96,20 +88,6 @@ delete feature.popup; } } - function osm_getTileURL(bounds) { - var res = this.map.getResolution(); - var x = Math.round((bounds.left - this.maxExtent.left) / (res * this.tileSize.w)); - var y = Math.round((this.maxExtent.top - bounds.top) / (res * this.tileSize.h)); - var z = this.map.getZoom(); - var limit = Math.pow(2, z); - - if (y < 0 || y >= limit) { - return OpenLayers.Util.getImagesLocation() + "404.png"; - } else { - x = ((x % limit) + limit) % limit; - return this.url + z + "/" + x + "/" + y + "." + this.type; - } - }