Port vector examples to new vector API
This commit is contained in:
@@ -1,9 +1,10 @@
|
||||
goog.require('ol.Map');
|
||||
goog.require('ol.View');
|
||||
goog.require('ol.format.TopoJSON');
|
||||
goog.require('ol.layer.Tile');
|
||||
goog.require('ol.layer.Vector');
|
||||
goog.require('ol.source.TileJSON');
|
||||
goog.require('ol.source.TopoJSON');
|
||||
goog.require('ol.source.Vector');
|
||||
goog.require('ol.style.Fill');
|
||||
goog.require('ol.style.Stroke');
|
||||
goog.require('ol.style.Style');
|
||||
@@ -26,9 +27,9 @@ var styleArray = [new ol.style.Style({
|
||||
})];
|
||||
|
||||
var vector = new ol.layer.Vector({
|
||||
source: new ol.source.TopoJSON({
|
||||
projection: 'EPSG:3857',
|
||||
url: 'data/topojson/world-110m.json'
|
||||
source: new ol.source.Vector({
|
||||
url: 'data/topojson/world-110m.json',
|
||||
format: new ol.format.TopoJSON()
|
||||
}),
|
||||
style: function(feature, resolution) {
|
||||
// don't want to render the full world polygon, which repeats all countries
|
||||
|
||||
Reference in New Issue
Block a user