- add '.gitea/workflows/build.yaml'
- npm updates - add map tool for drawing rectangles
This commit is contained in:
parent
a744ae7e5b
commit
12b02a0d7d
6 changed files with 302 additions and 136 deletions
|
@ -3,7 +3,7 @@
|
|||
<!-- <Map className="h-36" :center="state.center" :zoom="state.zoom"> // map component content </Map> -->
|
||||
<div :id="mapId" class="map-container mapDesktop rounded">
|
||||
<ZoomControlComponent :mapId="mapId"></ZoomControlComponent>
|
||||
<DrawControlComponent :mapId="mapId"></DrawControlComponent>
|
||||
<DrawControlComponent :mapId="mapId" :southWest="southWest" :northEast="northEast"></DrawControlComponent>
|
||||
</div>
|
||||
</div>
|
||||
</template>
|
||||
|
@ -71,12 +71,16 @@ export default class MapComponent extends Vue {
|
|||
|
||||
mapService = MapService();
|
||||
|
||||
southWest;
|
||||
northEast;
|
||||
|
||||
|
||||
/**
|
||||
* Informs when initialization is done with map id.
|
||||
*/
|
||||
public onMapInitializedEvent: EventEmitter<string> = new EventEmitter<string>();
|
||||
|
||||
protected map!: Map;
|
||||
public map!: Map;
|
||||
// protected drawnItems!: FeatureGroup<any>;
|
||||
|
||||
// @Prop({ type: Object })
|
||||
|
@ -104,9 +108,9 @@ export default class MapComponent extends Vue {
|
|||
// if (this.fitBounds) {
|
||||
// this.map.fitBounds(this.fitBounds);
|
||||
// }
|
||||
const southWest = toLatLng(46.5, 9.9);
|
||||
const northEast = toLatLng(48.9, 16.9);
|
||||
const bounds = toLatLngBounds(southWest, northEast);
|
||||
this.southWest = toLatLng(46.5, 9.9);
|
||||
this.northEast = toLatLng(48.9, 16.9);
|
||||
const bounds = toLatLngBounds(this.southWest, this.northEast);
|
||||
map.fitBounds(bounds);
|
||||
|
||||
const attributionControl = new Attribution().addTo(this.map);
|
||||
|
|
Loading…
Add table
editor.link_modal.header
Reference in a new issue