Add TileJSON example

This commit is contained in:
Tom Payne
2013-03-06 20:21:07 +01:00
parent 3e7cd5fffb
commit 99870acd19
2 changed files with 75 additions and 0 deletions

23
examples/tilejson.js Normal file
View File

@@ -0,0 +1,23 @@
goog.require('ol.Coordinate');
goog.require('ol.Map');
goog.require('ol.RendererHints');
goog.require('ol.View2D');
goog.require('ol.layer.TileLayer');
goog.require('ol.source.TileJSON');
var map = new ol.Map({
layers: [
new ol.layer.TileLayer({
source: new ol.source.TileJSON({
uri: 'http://api.tiles.mapbox.com/v3/mapbox.geography-class.jsonp'
})
})
],
renderers: ol.RendererHints.createFromQueryData(),
target: 'map',
view: new ol.View2D({
center: new ol.Coordinate(0, 0),
zoom: 2
})
});