Skip to main content
4 of 5
added code to answer, in case link goes bad.
Devdatta Tengshe
  • 41.6k
  • 35
  • 144
  • 263

I've made some minor changes to your code. In fact I've added a few properties to your layer:

var skoLayer = new OpenLayers.Layer.XYZ("skobbler",
                ["${z}/${x}/${y}.png?api_key=<Your Key Here>"], 
                    {numZoomLevels: 18, 
                    sphericalMercator: true, 
                    isBaseLayer: true, 
                    wrapDateLine: true, 
                    maxExtent: new OpenLayers.Bounds(-180, -180, 180, 120),
                    attribution: attrib
                });

And here's the whole code for you, to easily test it. Just unzip the archive (tested for viruses), extract the scrobbler.html file and double click it.

Just zoom out and move the map, as you like.

Sorin Călinică
  • 5.1k
  • 1
  • 18
  • 23