Skip to content

Commit

Permalink
Take advantage of default tile grid
Browse files Browse the repository at this point in the history
  • Loading branch information
tschaub committed Aug 12, 2017
1 parent 3b44497 commit 29fcf5f
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 5 deletions.
2 changes: 0 additions & 2 deletions examples/geojson-vt.js
Expand Up @@ -6,7 +6,6 @@ goog.require('ol.source.OSM');
goog.require('ol.source.VectorTile');
goog.require('ol.layer.Tile');
goog.require('ol.layer.VectorTile');
goog.require('ol.tilegrid');
goog.require('ol.proj.Projection');


Expand Down Expand Up @@ -77,7 +76,6 @@ fetch(url).then(function(response) {
});
var vectorSource = new ol.source.VectorTile({
format: new ol.format.GeoJSON(),
tileGrid: ol.tilegrid.createXYZ(),
tileLoadFunction: function(tile) {
var format = tile.getFormat();
var tileCoord = tile.getTileCoord();
Expand Down
4 changes: 1 addition & 3 deletions examples/osm-vector-tiles.js
Expand Up @@ -7,8 +7,6 @@ goog.require('ol.source.VectorTile');
goog.require('ol.style.Fill');
goog.require('ol.style.Stroke');
goog.require('ol.style.Style');
goog.require('ol.tilegrid');


var key = 'vector-tiles-5eJz6JX';

Expand Down Expand Up @@ -70,7 +68,7 @@ var map = new ol.Map({
layerName: 'layer',
layers: ['water', 'roads', 'buildings']
}),
tileGrid: ol.tilegrid.createXYZ({tileSize: 512, maxZoom: 19}),
maxZoom: 19,
url: 'https://tile.mapzen.com/mapzen/vector/v1/all/{z}/{x}/{y}.topojson?api_key=' + key
}),
style: function(feature, resolution) {
Expand Down

0 comments on commit 29fcf5f

Please sign in to comment.