Skip to content
Snippets Groups Projects
Commit 18375c8b authored by Bhabesh Bhabani Mukhopadhyay's avatar Bhabesh Bhabani Mukhopadhyay
Browse files

#VOAPP-35 : Select Point of Interest in dropdown

parent 5a0092bb
No related branches found
No related tags found
No related merge requests found
...@@ -56,7 +56,7 @@ let parser = new WMTSCapabilities(); ...@@ -56,7 +56,7 @@ let parser = new WMTSCapabilities();
export default { export default {
name : 'MapObservation', name : 'MapObservation',
props : ['geoinfo','isMapPanelVisible'], props : ['geoinfo','isMapPanelVisible','locationPointOfInterestId'],
data(){ data(){
return { return {
isMyMapPanelVisible : '', isMyMapPanelVisible : '',
...@@ -339,18 +339,22 @@ export default { ...@@ -339,18 +339,22 @@ export default {
this.myGeoInfo = this.geoinfo; this.myGeoInfo = this.geoinfo;
} }
if(this.myGeoInfo) if(this.myGeoInfo)
{ {
this.latitude = this.myGeoInfo.features[0].geometry.coordinates[0]; this.latitude = this.myGeoInfo.features[0].geometry.coordinates[0];
this.longitude = this.myGeoInfo.features[0].geometry.coordinates[1]; this.longitude = this.myGeoInfo.features[0].geometry.coordinates[1];
this.mapZoom = CommonUtil.CONST_GPS_OBSERVATION_ZOOM; this.mapZoom = CommonUtil.CONST_GPS_OBSERVATION_ZOOM;
} }
else else
{ {
this.mapZoom = CommonUtil.CONST_GPS_DEFAULT_ZOOM; this.mapZoom = CommonUtil.CONST_GPS_DEFAULT_ZOOM;
} }
if(routeParam.locationPointOfInterestId)
{
this.poi.pointOfInterestId = routeParam.locationPointOfInterestId;
}
this.$nextTick(function () { this.$nextTick(function () {
this.initMap(); this.initMap();
......
...@@ -18,7 +18,7 @@ ...@@ -18,7 +18,7 @@
<!-- <input type="datetime-local" v-bind='strDateObservation | dateFormat' v-model="strDateObservation"/> --> <!-- <input type="datetime-local" v-bind='strDateObservation | dateFormat' v-model="strDateObservation"/> -->
<input type="datetime-local" v-model="strDateObservation" /> <input type="datetime-local" v-model="strDateObservation" />
</div> </div>
<router-link id="linkMap" ref='linkMap' :to="{name:'MapObservation', params: {geoinfo:mapGeoinfo,isMapPanelVisible:newMapPanel}}">Observation Map </router-link> <router-link id="linkMap" ref='linkMap' :to="{name:'MapObservation', params: {geoinfo:mapGeoinfo,isMapPanelVisible:newMapPanel,locationPointOfInterestId:mapLocationPointOfInterestId}}">Observation Map </router-link>
<div v-if="mapGeoinfo" id="divMapGeoInfo"><map-observation :geoinfo="mapGeoinfo" :isMapPanelVisible="isMapPanelVisible"></map-observation></div> <div v-if="mapGeoinfo" id="divMapGeoInfo"><map-observation :geoinfo="mapGeoinfo" :isMapPanelVisible="isMapPanelVisible"></map-observation></div>
...@@ -61,6 +61,7 @@ export default { ...@@ -61,6 +61,7 @@ export default {
observationHeader : '', observationHeader : '',
observationText : '', observationText : '',
mapGeoinfo:'', mapGeoinfo:'',
mapLocationPointOfInterestId:'',
isMapPanelVisible:false, isMapPanelVisible:false,
newMapPanel:true, newMapPanel:true,
observationForStore : observationForStore :
...@@ -117,6 +118,14 @@ export default { ...@@ -117,6 +118,14 @@ export default {
{ {
this.mapGeoinfo = JSON.parse(jsonObservation.geoinfo); this.mapGeoinfo = JSON.parse(jsonObservation.geoinfo);
} }
else
{
if(jsonObservation.location.geoJSON)
{
this.mapGeoinfo = JSON.parse(jsonObservation.location.geoJSON);
this.mapLocationPointOfInterestId = jsonObservation.locationPointOfInterestId;
}
}
} }
else { else {
//TODO for new Observation //TODO for new Observation
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment