Merge pull request #3416 from fredj/cleanup
Remove unnecessary typecasts in examples
This commit is contained in:
@@ -15,58 +15,53 @@ var fill = new ol.style.Fill({color: 'red'});
|
||||
|
||||
var styles = {
|
||||
'square': [new ol.style.Style({
|
||||
image: new ol.style.RegularShape(
|
||||
/** @type {olx.style.RegularShapeOptions} */({
|
||||
fill: fill,
|
||||
stroke: stroke,
|
||||
points: 4,
|
||||
radius: 10,
|
||||
angle: Math.PI / 4
|
||||
}))
|
||||
image: new ol.style.RegularShape({
|
||||
fill: fill,
|
||||
stroke: stroke,
|
||||
points: 4,
|
||||
radius: 10,
|
||||
angle: Math.PI / 4
|
||||
})
|
||||
})],
|
||||
'triangle': [new ol.style.Style({
|
||||
image: new ol.style.RegularShape(
|
||||
/** @type {olx.style.RegularShapeOptions} */({
|
||||
fill: fill,
|
||||
stroke: stroke,
|
||||
points: 3,
|
||||
radius: 10,
|
||||
rotation: Math.PI / 4,
|
||||
angle: 0
|
||||
}))
|
||||
image: new ol.style.RegularShape({
|
||||
fill: fill,
|
||||
stroke: stroke,
|
||||
points: 3,
|
||||
radius: 10,
|
||||
rotation: Math.PI / 4,
|
||||
angle: 0
|
||||
})
|
||||
})],
|
||||
'star': [new ol.style.Style({
|
||||
image: new ol.style.RegularShape(
|
||||
/** @type {olx.style.RegularShapeOptions} */({
|
||||
fill: fill,
|
||||
stroke: stroke,
|
||||
points: 5,
|
||||
radius: 10,
|
||||
radius2: 4,
|
||||
angle: 0
|
||||
}))
|
||||
image: new ol.style.RegularShape({
|
||||
fill: fill,
|
||||
stroke: stroke,
|
||||
points: 5,
|
||||
radius: 10,
|
||||
radius2: 4,
|
||||
angle: 0
|
||||
})
|
||||
})],
|
||||
'cross': [new ol.style.Style({
|
||||
image: new ol.style.RegularShape(
|
||||
/** @type {olx.style.RegularShapeOptions} */({
|
||||
fill: fill,
|
||||
stroke: stroke,
|
||||
points: 4,
|
||||
radius: 10,
|
||||
radius2: 0,
|
||||
angle: 0
|
||||
}))
|
||||
image: new ol.style.RegularShape({
|
||||
fill: fill,
|
||||
stroke: stroke,
|
||||
points: 4,
|
||||
radius: 10,
|
||||
radius2: 0,
|
||||
angle: 0
|
||||
})
|
||||
})],
|
||||
'x': [new ol.style.Style({
|
||||
image: new ol.style.RegularShape(
|
||||
/** @type {olx.style.RegularShapeOptions} */({
|
||||
fill: fill,
|
||||
stroke: stroke,
|
||||
points: 4,
|
||||
radius: 10,
|
||||
radius2: 0,
|
||||
angle: Math.PI / 4
|
||||
}))
|
||||
image: new ol.style.RegularShape({
|
||||
fill: fill,
|
||||
stroke: stroke,
|
||||
points: 4,
|
||||
radius: 10,
|
||||
radius2: 0,
|
||||
angle: Math.PI / 4
|
||||
})
|
||||
})]
|
||||
};
|
||||
|
||||
|
||||
@@ -10,12 +10,12 @@ var layers = [
|
||||
source: new ol.source.MapQuest({layer: 'sat'})
|
||||
}),
|
||||
new ol.layer.Tile({
|
||||
source: new ol.source.TileWMS(/** @type {olx.source.TileWMSOptions} */ ({
|
||||
source: new ol.source.TileWMS({
|
||||
url: 'http://demo.boundlessgeo.com/geoserver/ne/wms',
|
||||
params: {'LAYERS': 'ne:ne_10m_admin_0_countries', 'TILED': true},
|
||||
serverType: 'geoserver',
|
||||
wrapX: true
|
||||
}))
|
||||
})
|
||||
})
|
||||
];
|
||||
var map = new ol.Map({
|
||||
|
||||
@@ -11,11 +11,11 @@ var layers = [
|
||||
}),
|
||||
new ol.layer.Tile({
|
||||
extent: [-13884991, 2870341, -7455066, 6338219],
|
||||
source: new ol.source.TileWMS(/** @type {olx.source.TileWMSOptions} */ ({
|
||||
source: new ol.source.TileWMS({
|
||||
url: 'http://demo.boundlessgeo.com/geoserver/wms',
|
||||
params: {'LAYERS': 'topp:states', 'TILED': true},
|
||||
serverType: 'geoserver'
|
||||
}))
|
||||
})
|
||||
})
|
||||
];
|
||||
var map = new ol.Map({
|
||||
|
||||
Reference in New Issue
Block a user