Share editing default styles

This commit is contained in:
Antoine Abt
2014-02-24 11:17:39 +01:00
parent 24ad507710
commit 5cc1a986c2
6 changed files with 108 additions and 106 deletions

View File

@@ -8,9 +8,6 @@ goog.require('ol.layer.Tile');
goog.require('ol.layer.Vector');
goog.require('ol.source.GeoJSON');
goog.require('ol.source.MapQuest');
goog.require('ol.style.Fill');
goog.require('ol.style.Stroke');
goog.require('ol.style.Style');
var raster = new ol.layer.Tile({
@@ -19,27 +16,15 @@ var raster = new ol.layer.Tile({
})
});
var source = new ol.source.GeoJSON({
projection: 'EPSG:3857',
url: 'data/geojson/countries.geojson'
});
var vector = new ol.layer.Vector({
source: source
});
var select = new ol.interaction.Select({
style: new ol.style.Style({
stroke: new ol.style.Stroke({
color: '#3399CC',
width: 2.5
}),
fill: new ol.style.Fill({
color: 'rgba(255,255,255,0.6)'
})
source: new ol.source.GeoJSON({
projection: 'EPSG:3857',
url: 'data/geojson/countries.geojson'
})
});
var select = new ol.interaction.Select();
var modify = new ol.interaction.Modify({
features: select.getFeatures()
});