mirror of
https://github.com/muerwre/orchidmap-front.git
synced 2025-04-25 02:56:41 +07:00
removed unused things
This commit is contained in:
parent
cb3fabaf74
commit
8333807b31
3 changed files with 2 additions and 5 deletions
|
@ -8,7 +8,7 @@ export class Map {
|
||||||
constructor({ container }) {
|
constructor({ container }) {
|
||||||
this.map = map(container, { editable: true }).setView([55.0153275, 82.9071235], 13);
|
this.map = map(container, { editable: true }).setView([55.0153275, 82.9071235], 13);
|
||||||
|
|
||||||
this.tileLayer = tileLayer(providers.dgis, {
|
this.tileLayer = tileLayer(providers.default, {
|
||||||
attribution: 'Независимое Велосообщество',
|
attribution: 'Независимое Велосообщество',
|
||||||
maxNativeZoom: 18,
|
maxNativeZoom: 18,
|
||||||
maxZoom: 18,
|
maxZoom: 18,
|
||||||
|
|
|
@ -21,7 +21,6 @@ export class Poly {
|
||||||
}
|
}
|
||||||
|
|
||||||
updateMarks = () => {
|
updateMarks = () => {
|
||||||
console.log('upd');
|
|
||||||
const coords = this.poly.toGeoJSON().geometry.coordinates;
|
const coords = this.poly.toGeoJSON().geometry.coordinates;
|
||||||
this.latlngs = (coords && coords.length && coords.map(([lng, lat]) => ({ lng, lat }))) || [];
|
this.latlngs = (coords && coords.length && coords.map(([lng, lat]) => ({ lng, lat }))) || [];
|
||||||
const meters = (this.poly && (L.GeometryUtil.length(this.poly) / 1000)) || 0;
|
const meters = (this.poly && (L.GeometryUtil.length(this.poly) / 1000)) || 0;
|
||||||
|
@ -67,11 +66,9 @@ export class Poly {
|
||||||
|
|
||||||
continue = () => {
|
continue = () => {
|
||||||
if (this.latlngs && this.latlngs.length) {
|
if (this.latlngs && this.latlngs.length) {
|
||||||
console.log('continue?');
|
|
||||||
this.poly.enableEdit().continueForward();
|
this.poly.enableEdit().continueForward();
|
||||||
this.poly.editor.reset();
|
this.poly.editor.reset();
|
||||||
} else {
|
} else {
|
||||||
console.log('start over');
|
|
||||||
this.poly = this.map.editTools.startPolyline();
|
this.poly = this.map.editTools.startPolyline();
|
||||||
this.poly.setStyle(polyStyle);
|
this.poly.setStyle(polyStyle);
|
||||||
}
|
}
|
||||||
|
|
|
@ -58,7 +58,7 @@ export class Shotter {
|
||||||
const placement = this.getTilePlacement();
|
const placement = this.getTilePlacement();
|
||||||
|
|
||||||
axios.get('http://alpha-map.vault48.org/engine/composerOrchid.php', {
|
axios.get('http://alpha-map.vault48.org/engine/composerOrchid.php', {
|
||||||
params: { placement, mode: 'test' }
|
params: { placement }
|
||||||
})
|
})
|
||||||
.then(console.log)
|
.then(console.log)
|
||||||
.catch(console.warn);
|
.catch(console.warn);
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue