bugfix naming
This commit is contained in:
parent
0be9e0a56d
commit
601f254c53
11279
dist/main.js
vendored
11279
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(),
|
format: new OSMXML(),
|
||||||
url: 'https://seafile.milliways.info/f/688170149668429f9598/?dl=1',
|
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
|
strategy: allStrategy
|
||||||
})
|
})
|
||||||
|
|
||||||
|
@ -149,7 +130,7 @@ var map = new Map({
|
||||||
new TileLayer({
|
new TileLayer({
|
||||||
source: new OSM()
|
source: new OSM()
|
||||||
}),
|
}),
|
||||||
new VectorTileLayer({
|
new VectorLayer({
|
||||||
source: vectorSource,
|
source: vectorSource,
|
||||||
style: function(feature) {
|
style: function(feature) {
|
||||||
for (var key in styles) {
|
for (var key in styles) {
|
||||||
|
|
Loading…
Reference in a new issue