bugfix naming
This commit is contained in:
parent
0be9e0a56d
commit
601f254c53
11349
dist/main.js
vendored
11349
dist/main.js
vendored
File diff suppressed because it is too large
Load diff
2
dist/main.js.map
vendored
2
dist/main.js.map
vendored
File diff suppressed because one or more lines are too long
23
src/app.js
23
src/app.js
|
@ -114,28 +114,9 @@ var styles = {
|
|||
}
|
||||
};
|
||||
|
||||
var vectorSource = new VectorTileSource({
|
||||
var vectorSource = new VectorSource({
|
||||
format: new OSMXML(),
|
||||
url: 'https://seafile.milliways.info/f/688170149668429f9598/?dl=1',
|
||||
/*loader: function(extent, resolution, projection) {
|
||||
var proj = projection.getCode();
|
||||
var url = 'https://seafile.milliways.info/f/688170149668429f9598/?dl=1';
|
||||
var xhr = new XMLHttpRequest();
|
||||
xhr.open('GET', url);
|
||||
var onError = function(e) {
|
||||
vectorSource.removeLoadedExtent(extent);
|
||||
}
|
||||
xhr.onerror = onError;
|
||||
xhr.onload = function() {
|
||||
if (xhr.status == 200) {
|
||||
vectorSource.addFeatures(
|
||||
vectorSource.getFormat().readFeatures(xhr.responseText));
|
||||
} else {
|
||||
onError();
|
||||
}
|
||||
}
|
||||
xhr.send();
|
||||
},*/
|
||||
strategy: allStrategy
|
||||
})
|
||||
|
||||
|
@ -149,7 +130,7 @@ var map = new Map({
|
|||
new TileLayer({
|
||||
source: new OSM()
|
||||
}),
|
||||
new VectorTileLayer({
|
||||
new VectorLayer({
|
||||
source: vectorSource,
|
||||
style: function(feature) {
|
||||
for (var key in styles) {
|
||||
|
|
Loading…
Reference in a new issue