Adding float-no-zero branch hosted build
This commit is contained in:
37
float-no-zero/examples/select-features.js
Normal file
37
float-no-zero/examples/select-features.js
Normal file
@@ -0,0 +1,37 @@
|
||||
var raster = new ol.layer.Tile({
|
||||
source: new ol.source.MapQuest({layer: 'sat'})
|
||||
});
|
||||
|
||||
var vector = new ol.layer.Vector({
|
||||
source: new ol.source.GeoJSON({
|
||||
projection: 'EPSG:3857',
|
||||
url: 'data/geojson/countries.geojson'
|
||||
}),
|
||||
style: new ol.style.Style({
|
||||
fill: new ol.style.Fill({
|
||||
color: 'rgba(255,255,255,0.25)'
|
||||
}),
|
||||
stroke: new ol.style.Stroke({
|
||||
color: '#6666ff'
|
||||
})
|
||||
})
|
||||
});
|
||||
|
||||
var select = new ol.interaction.Select({
|
||||
style: new ol.style.Style({
|
||||
fill: new ol.style.Fill({
|
||||
color: 'rgba(255,255,255,0.5)'
|
||||
})
|
||||
})
|
||||
});
|
||||
|
||||
var map = new ol.Map({
|
||||
interactions: ol.interaction.defaults().extend([select]),
|
||||
layers: [raster, vector],
|
||||
renderer: 'canvas',
|
||||
target: 'map',
|
||||
view: new ol.View2D({
|
||||
center: [0, 0],
|
||||
zoom: 2
|
||||
})
|
||||
});
|
||||
Reference in New Issue
Block a user