Build and parse examples from examples_src/

This commit is contained in:
Andreas Hocevar
2015-04-01 18:22:56 +02:00
parent 2e9869057e
commit ff1ee78ddd
263 changed files with 3 additions and 3 deletions

View File

@@ -0,0 +1,42 @@
goog.require('ol.Geolocation');
goog.require('ol.Map');
goog.require('ol.View');
goog.require('ol.layer.Tile');
goog.require('ol.source.BingMaps');
var view = new ol.View({
center: [0, 0],
zoom: 2
});
var map = new ol.Map({
layers: [
new ol.layer.Tile({
source: new ol.source.BingMaps({
key: 'Ak-dzM4wZjSqTlzveKz5u0d4IQ4bRzVI309GxmkgSVr1ewS6iPSrOvOKhA-CJlm3',
imagerySet: 'Road'
})
})
],
renderer: exampleNS.getRendererFromQueryString(),
target: 'map',
view: view
});
var geolocation = new ol.Geolocation({
projection: view.getProjection(),
tracking: true
});
geolocation.once('change:position', function() {
view.setCenter(geolocation.getPosition());
view.setResolution(2.388657133911758);
});
// Use FastClick to eliminate the 300ms delay between a physical tap
// and the firing of a click event on mobile browsers.
// See http://updates.html5rocks.com/2013/12/300ms-tap-delay-gone-away
// for more information.
$(function() {
FastClick.attach(document.body);
});