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

#VOAPP-37 : Marker placed at center in map for selected POI dropdown

parent b5f5ec93
No related branches found
No related tags found
No related merge requests found
......@@ -111,6 +111,7 @@ export default {
let pointMarker = this.myOverLay (coordinate);
let pointMarkerCoord = this.myOverLayCoord(latitude,longitude);
fetch(urlMap)
......@@ -196,7 +197,7 @@ export default {
/******* Below code for vector marker positioning */
var iconFeature = new Feature({
var iconFeature = new Feature({
geometry: new Point(fromLonLat(transFormCord))
});
vectorSource.clear();
......@@ -209,7 +210,8 @@ export default {
}),
});
This.myMap.addLayer(vectorLayer);
This.myMap.addLayer(vectorLayer);
}
......@@ -287,6 +289,7 @@ export default {
{
return (mapInteractions) ? [] : '';
},
getMyPointOfInterst(lstPOI)
{
let userUUID = localStorage.getItem(CommonUtil.CONST_STORAGE_UUID);
......@@ -333,6 +336,27 @@ export default {
this.myMap.getView().setCenter(fromLonLat(coordinate));
let myImage = this.myImage();
let transFormCord = [this.latitude,this.longitude];
let vectorSource = this.myVectorGeoSource();
var iconFeature = new Feature({
geometry: new Point(fromLonLat(transFormCord))
});
vectorSource.clear();
vectorSource.addFeature(iconFeature);
var vectorLayer = new VectorLayer({
source: vectorSource,
style: new Style({
image: myImage,
}),
});
this.myMap.addLayer(vectorLayer);
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment