Add vectortile branch

This commit is contained in:
Andreas Hocevar
2015-09-10 15:23:57 +02:00
parent 57ee7f52fd
commit 962473c3ab
3201 changed files with 978141 additions and 0 deletions
+29
View File
@@ -0,0 +1,29 @@
var scaleLineControl = new ol.control.ScaleLine();
var map = new ol.Map({
controls: ol.control.defaults({
attributionOptions: /** @type {olx.control.AttributionOptions} */ ({
collapsible: false
})
}).extend([
scaleLineControl
]),
layers: [
new ol.layer.Tile({
source: new ol.source.OSM()
})
],
renderer: common.getRendererFromQueryString(),
target: 'map',
view: new ol.View({
center: [0, 0],
zoom: 2
})
});
var unitsSelect = $('#units');
unitsSelect.on('change', function() {
scaleLineControl.setUnits(this.value);
});
unitsSelect.val(scaleLineControl.getUnits());