Remove unneeded type cast from examples
This commit is contained in:
@@ -13,9 +13,9 @@ var map = new ol.Map({
|
||||
],
|
||||
target: 'map',
|
||||
controls: ol.control.defaults({
|
||||
attributionOptions: /** @type {olx.control.AttributionOptions} */ ({
|
||||
attributionOptions: {
|
||||
collapsible: false
|
||||
})
|
||||
}
|
||||
}),
|
||||
view: new ol.View({
|
||||
center: [0, 0],
|
||||
|
||||
@@ -22,9 +22,9 @@ var map = new ol.Map({
|
||||
],
|
||||
target: 'map',
|
||||
controls: ol.control.defaults({
|
||||
attributionOptions: /** @type {olx.control.AttributionOptions} */ ({
|
||||
attributionOptions: {
|
||||
collapsible: false
|
||||
})
|
||||
}
|
||||
}),
|
||||
view: new ol.View({
|
||||
center: ol.proj.transform(
|
||||
|
||||
@@ -51,9 +51,9 @@ var map = new ol.Map({
|
||||
],
|
||||
target: 'map',
|
||||
controls: ol.control.defaults({
|
||||
attributionOptions: /** @type {olx.control.AttributionOptions} */ ({
|
||||
attributionOptions: {
|
||||
collapsible: false
|
||||
})
|
||||
}
|
||||
}),
|
||||
view: view
|
||||
});
|
||||
|
||||
@@ -59,9 +59,9 @@ ol.inherits(app.RotateNorthControl, ol.control.Control);
|
||||
|
||||
var map = new ol.Map({
|
||||
controls: ol.control.defaults({
|
||||
attributionOptions: /** @type {olx.control.AttributionOptions} */ ({
|
||||
attributionOptions: {
|
||||
collapsible: false
|
||||
})
|
||||
}
|
||||
}).extend([
|
||||
new app.RotateNorthControl()
|
||||
]),
|
||||
|
||||
@@ -92,8 +92,7 @@ app.Drag.prototype.handleDragEvent = function(evt) {
|
||||
var deltaX = evt.coordinate[0] - this.coordinate_[0];
|
||||
var deltaY = evt.coordinate[1] - this.coordinate_[1];
|
||||
|
||||
var geometry = /** @type {ol.geom.SimpleGeometry} */
|
||||
(this.feature_.getGeometry());
|
||||
var geometry = this.feature_.getGeometry();
|
||||
geometry.translate(deltaX, deltaY);
|
||||
|
||||
this.coordinate_[0] = evt.coordinate[0];
|
||||
|
||||
@@ -22,9 +22,9 @@ var map = new ol.Map({
|
||||
],
|
||||
target: 'map',
|
||||
controls: ol.control.defaults({
|
||||
attributionOptions: /** @type {olx.control.AttributionOptions} */ ({
|
||||
attributionOptions: {
|
||||
collapsible: false
|
||||
})
|
||||
}
|
||||
}),
|
||||
view: view
|
||||
});
|
||||
|
||||
@@ -23,9 +23,9 @@ var map = new ol.Map({
|
||||
],
|
||||
target: 'map',
|
||||
controls: ol.control.defaults({
|
||||
attributionOptions: /** @type {olx.control.AttributionOptions} */ ({
|
||||
attributionOptions: {
|
||||
collapsible: false
|
||||
})
|
||||
}
|
||||
}),
|
||||
view: new ol.View({
|
||||
center: [0, 0],
|
||||
|
||||
@@ -30,9 +30,9 @@ var map = new ol.Map({
|
||||
layers: [raster, vector],
|
||||
target: 'map',
|
||||
controls: ol.control.defaults({
|
||||
attributionOptions: /** @type {olx.control.AttributionOptions} */ ({
|
||||
attributionOptions: {
|
||||
collapsible: false
|
||||
})
|
||||
}
|
||||
}),
|
||||
view: new ol.View({
|
||||
center: [0, 0],
|
||||
|
||||
@@ -24,9 +24,9 @@ var map = new ol.Map({
|
||||
})
|
||||
],
|
||||
controls: ol.control.defaults({
|
||||
attributionOptions: /** @type {olx.control.AttributionOptions} */ ({
|
||||
attributionOptions: {
|
||||
collapsible: false
|
||||
})
|
||||
}
|
||||
}),
|
||||
target: 'map',
|
||||
view: new ol.View({
|
||||
|
||||
@@ -180,9 +180,9 @@ var map = new ol.Map({
|
||||
],
|
||||
target: 'map',
|
||||
controls: ol.control.defaults({
|
||||
attributionOptions: /** @type {olx.control.AttributionOptions} */ ({
|
||||
attributionOptions: {
|
||||
collapsible: false
|
||||
})
|
||||
}
|
||||
}),
|
||||
view: new ol.View({
|
||||
center: [0, 0],
|
||||
|
||||
@@ -23,9 +23,9 @@ var map = new ol.Map({
|
||||
],
|
||||
target: 'map',
|
||||
controls: ol.control.defaults({
|
||||
attributionOptions: /** @type {olx.control.AttributionOptions} */ ({
|
||||
attributionOptions: {
|
||||
collapsible: false
|
||||
})
|
||||
}
|
||||
}),
|
||||
view: view
|
||||
});
|
||||
@@ -46,14 +46,14 @@ var positions = new ol.geom.LineString([],
|
||||
/** @type {ol.geom.GeometryLayout} */ ('XYZM'));
|
||||
|
||||
// Geolocation Control
|
||||
var geolocation = new ol.Geolocation(/** @type {olx.GeolocationOptions} */ ({
|
||||
var geolocation = new ol.Geolocation({
|
||||
projection: view.getProjection(),
|
||||
trackingOptions: {
|
||||
maximumAge: 10000,
|
||||
enableHighAccuracy: true,
|
||||
timeout: 600000
|
||||
}
|
||||
}));
|
||||
});
|
||||
|
||||
var deltaMean = 500; // the geolocation sampling period mean in ms
|
||||
|
||||
|
||||
@@ -26,9 +26,9 @@ var map = new ol.Map({
|
||||
],
|
||||
target: 'map',
|
||||
controls: ol.control.defaults({
|
||||
attributionOptions: /** @type {olx.control.AttributionOptions} */ ({
|
||||
attributionOptions: {
|
||||
collapsible: false
|
||||
})
|
||||
}
|
||||
}),
|
||||
view: view
|
||||
});
|
||||
|
||||
@@ -99,9 +99,9 @@ var map = new ol.Map({
|
||||
],
|
||||
target: 'map',
|
||||
controls: ol.control.defaults({
|
||||
attributionOptions: /** @type {olx.control.AttributionOptions} */ ({
|
||||
attributionOptions: {
|
||||
collapsible: false
|
||||
})
|
||||
}
|
||||
}),
|
||||
view: new ol.View({
|
||||
center: [703365.7089403362, 5714629.865071137],
|
||||
|
||||
@@ -22,9 +22,9 @@ if (!ol.has.WEBGL) {
|
||||
renderer: /** @type {Array<ol.renderer.Type>} */ (['webgl', 'canvas']),
|
||||
target: 'map',
|
||||
controls: ol.control.defaults({
|
||||
attributionOptions: /** @type {olx.control.AttributionOptions} */ ({
|
||||
attributionOptions: {
|
||||
collapsible: false
|
||||
})
|
||||
}
|
||||
}),
|
||||
view: new ol.View({
|
||||
center: [0, 0],
|
||||
|
||||
@@ -12,9 +12,9 @@ var map = new ol.Map({
|
||||
layers: [osm],
|
||||
target: 'map',
|
||||
controls: ol.control.defaults({
|
||||
attributionOptions: /** @type {olx.control.AttributionOptions} */ ({
|
||||
attributionOptions: {
|
||||
collapsible: false
|
||||
})
|
||||
}
|
||||
}),
|
||||
view: new ol.View({
|
||||
center: [0, 0],
|
||||
|
||||
@@ -19,9 +19,9 @@ var map = new ol.Map({
|
||||
layers: [osm, bing],
|
||||
target: 'map',
|
||||
controls: ol.control.defaults({
|
||||
attributionOptions: /** @type {olx.control.AttributionOptions} */ ({
|
||||
attributionOptions: {
|
||||
collapsible: false
|
||||
})
|
||||
}
|
||||
}),
|
||||
view: new ol.View({
|
||||
center: [0, 0],
|
||||
|
||||
@@ -35,9 +35,9 @@ var map = new ol.Map({
|
||||
],
|
||||
target: 'map',
|
||||
controls: ol.control.defaults({
|
||||
attributionOptions: /** @type {olx.control.AttributionOptions} */ ({
|
||||
attributionOptions: {
|
||||
collapsible: false
|
||||
})
|
||||
}
|
||||
}),
|
||||
view: new ol.View({
|
||||
maxZoom: 18,
|
||||
|
||||
@@ -27,9 +27,9 @@ var map = new ol.Map({
|
||||
],
|
||||
target: 'map',
|
||||
controls: ol.control.defaults({
|
||||
attributionOptions: /** @type {olx.control.AttributionOptions} */ ({
|
||||
attributionOptions: {
|
||||
collapsible: false
|
||||
})
|
||||
}
|
||||
}),
|
||||
view: new ol.View({
|
||||
center: [653600, 5723680],
|
||||
|
||||
@@ -18,9 +18,9 @@ var mousePositionControl = new ol.control.MousePosition({
|
||||
|
||||
var map = new ol.Map({
|
||||
controls: ol.control.defaults({
|
||||
attributionOptions: /** @type {olx.control.AttributionOptions} */ ({
|
||||
attributionOptions: {
|
||||
collapsible: false
|
||||
})
|
||||
}
|
||||
}).extend([mousePositionControl]),
|
||||
layers: [
|
||||
new ol.layer.Tile({
|
||||
|
||||
@@ -15,9 +15,9 @@ var map = new ol.Map({
|
||||
],
|
||||
target: 'map',
|
||||
controls: ol.control.defaults({
|
||||
attributionOptions: /** @type {olx.control.AttributionOptions} */ ({
|
||||
attributionOptions: {
|
||||
collapsible: false
|
||||
})
|
||||
}
|
||||
}),
|
||||
view: new ol.View({
|
||||
center: [0, 0],
|
||||
|
||||
@@ -8,9 +8,9 @@ goog.require('ol.source.OSM');
|
||||
|
||||
var map = new ol.Map({
|
||||
controls: ol.control.defaults({
|
||||
attributionOptions: /** @type {olx.control.AttributionOptions} */ ({
|
||||
attributionOptions: {
|
||||
collapsible: false
|
||||
})
|
||||
}
|
||||
}).extend([
|
||||
new ol.control.ZoomToExtent({
|
||||
extent: [
|
||||
|
||||
@@ -30,9 +30,9 @@ var map = new ol.Map({
|
||||
})
|
||||
],
|
||||
controls: ol.control.defaults({
|
||||
attributionOptions: /** @type {olx.control.AttributionOptions} */ ({
|
||||
attributionOptions: {
|
||||
collapsible: false
|
||||
})
|
||||
}
|
||||
}),
|
||||
target: 'map',
|
||||
view: new ol.View({
|
||||
|
||||
@@ -18,13 +18,13 @@ var closer = document.getElementById('popup-closer');
|
||||
/**
|
||||
* Create an overlay to anchor the popup to the map.
|
||||
*/
|
||||
var overlay = new ol.Overlay(/** @type {olx.OverlayOptions} */ ({
|
||||
var overlay = new ol.Overlay({
|
||||
element: container,
|
||||
autoPan: true,
|
||||
autoPanAnimation: {
|
||||
duration: 250
|
||||
}
|
||||
}));
|
||||
});
|
||||
|
||||
|
||||
/**
|
||||
|
||||
@@ -13,9 +13,9 @@ var map = new ol.Map({
|
||||
],
|
||||
target: 'map',
|
||||
controls: ol.control.defaults({
|
||||
attributionOptions: /** @type {olx.control.AttributionOptions} */ ({
|
||||
attributionOptions: {
|
||||
collapsible: false
|
||||
})
|
||||
}
|
||||
}),
|
||||
view: new ol.View({
|
||||
center: [14200000, 4130000],
|
||||
|
||||
@@ -10,9 +10,9 @@ var scaleLineControl = new ol.control.ScaleLine();
|
||||
|
||||
var map = new ol.Map({
|
||||
controls: ol.control.defaults({
|
||||
attributionOptions: /** @type {olx.control.AttributionOptions} */ ({
|
||||
attributionOptions: {
|
||||
collapsible: false
|
||||
})
|
||||
}
|
||||
}).extend([
|
||||
scaleLineControl
|
||||
]),
|
||||
|
||||
@@ -12,9 +12,9 @@ var map = new ol.Map({
|
||||
})
|
||||
],
|
||||
controls: ol.control.defaults({
|
||||
attributionOptions: /** @type {olx.control.AttributionOptions} */ ({
|
||||
attributionOptions: {
|
||||
collapsible: false
|
||||
})
|
||||
}
|
||||
}),
|
||||
view: new ol.View({
|
||||
center: [0, 0],
|
||||
|
||||
@@ -127,9 +127,9 @@ map = new ol.Map({
|
||||
layers: [raster, vector],
|
||||
target: document.getElementById('map'),
|
||||
controls: ol.control.defaults({
|
||||
attributionOptions: /** @type {olx.control.AttributionOptions} */ ({
|
||||
attributionOptions: {
|
||||
collapsible: false
|
||||
})
|
||||
}
|
||||
}),
|
||||
view: new ol.View({
|
||||
center: [739218, 5906096],
|
||||
|
||||
@@ -41,7 +41,7 @@ var layers = [
|
||||
'LAYERS': 'ch.swisstopo.pixelkarte-farbe-pk1000.noscale',
|
||||
'FORMAT': 'image/jpeg'
|
||||
},
|
||||
serverType: /** @type {ol.source.WMSServerType} */ ('mapserver')
|
||||
serverType: 'mapserver'
|
||||
})
|
||||
}),
|
||||
new ol.layer.Image({
|
||||
@@ -52,7 +52,7 @@ var layers = [
|
||||
attributions: '© <a href="http://www.geo.admin.ch/internet/geoportal/' +
|
||||
'en/home.html">National parks / geo.admin.ch</a>',
|
||||
params: {'LAYERS': 'ch.bafu.schutzgebiete-paerke_nationaler_bedeutung'},
|
||||
serverType: /** @type {ol.source.WMSServerType} */ ('mapserver')
|
||||
serverType: 'mapserver'
|
||||
})
|
||||
})
|
||||
];
|
||||
|
||||
@@ -23,11 +23,11 @@ var layers = [
|
||||
}),
|
||||
new ol.layer.Tile({
|
||||
extent: extent,
|
||||
source: new ol.source.TileWMS(/** @type {olx.source.TileWMSOptions} */ ({
|
||||
source: new ol.source.TileWMS({
|
||||
attributions: ['Iowa State University'],
|
||||
url: 'https://mesonet.agron.iastate.edu/cgi-bin/wms/nexrad/n0r-t.cgi',
|
||||
params: {'LAYERS': 'nexrad-n0r-wmst'}
|
||||
}))
|
||||
})
|
||||
})
|
||||
];
|
||||
var map = new ol.Map({
|
||||
|
||||
@@ -11,9 +11,9 @@ goog.require('ol.tilegrid.WMTS');
|
||||
var map = new ol.Map({
|
||||
target: 'map',
|
||||
controls: ol.control.defaults({
|
||||
attributionOptions: /** @type {olx.control.AttributionOptions} */ ({
|
||||
attributionOptions: {
|
||||
collapsible: false
|
||||
})
|
||||
}
|
||||
}),
|
||||
view: new ol.View({
|
||||
zoom: 5,
|
||||
|
||||
@@ -49,9 +49,9 @@ var map = new ol.Map({
|
||||
],
|
||||
target: 'map',
|
||||
controls: ol.control.defaults({
|
||||
attributionOptions: /** @type {olx.control.AttributionOptions} */ ({
|
||||
attributionOptions: {
|
||||
collapsible: false
|
||||
})
|
||||
}
|
||||
}),
|
||||
view: new ol.View({
|
||||
center: [-11158582, 4813697],
|
||||
|
||||
Reference in New Issue
Block a user