Fix vector examples
This commit is contained in:
@@ -30,6 +30,7 @@ var map = new ol.Map({
|
||||
new ol.layer.Image({
|
||||
source: new ol.source.ImageVector({
|
||||
source: new ol.source.GeoJSON({
|
||||
projection: 'EPSG:3857',
|
||||
url: 'data/geojson/countries.geojson'
|
||||
}),
|
||||
styleFunction: function(feature, resolution) {
|
||||
|
||||
@@ -47,6 +47,7 @@ var styleFunction = function(feature, resolution) {
|
||||
|
||||
var vector = new ol.layer.Vector({
|
||||
source: new ol.source.KML({
|
||||
projection: 'EPSG:3857',
|
||||
url: 'data/kml/timezones.kml'
|
||||
}),
|
||||
styleFunction: styleFunction
|
||||
|
||||
@@ -33,6 +33,7 @@ var selectedStyle = [new ol.style.Style({
|
||||
|
||||
var vector = new ol.layer.Vector({
|
||||
source: new ol.source.GeoJSON({
|
||||
projection: 'EPSG:3857',
|
||||
url: 'data/geojson/countries.geojson'
|
||||
}),
|
||||
styleFunction: function(feature, layer) {
|
||||
|
||||
@@ -19,6 +19,7 @@ var raster = new ol.layer.Tile({
|
||||
|
||||
var vector = new ol.layer.Vector({
|
||||
source: new ol.source.TopoJSON({
|
||||
projection: 'EPSG:3857',
|
||||
url: 'data/topojson/world-110m.json'
|
||||
}),
|
||||
styleFunction: function(feature, resolution) {
|
||||
|
||||
@@ -15,6 +15,7 @@ goog.require('ol.style.Text');
|
||||
var styleCache = {};
|
||||
var vectorLayer = new ol.layer.Vector({
|
||||
source: new ol.source.GeoJSON({
|
||||
projection: 'EPSG:3857',
|
||||
url: 'data/geojson/countries.geojson'
|
||||
}),
|
||||
styleFunction: function(feature, resolution) {
|
||||
|
||||
Reference in New Issue
Block a user