jasper07 / openui5-googlemaps

Openui5 Googlemaps library
MIT License
65 stars 43 forks source link

set Markers in the Map #21

Closed vinny366 closed 8 years ago

vinny366 commented 8 years ago

Hi I am new to UI5. I am working on using the google maps. Currently i embedded the map onto my shell and appended the markers like below.

`

` The issue i am facing is if i want to add an extra marker from user input without removing the already loaded marker. I created a new marker `var oMarker = new openui5.googlemaps.Marker({ lat: '16', lng: '80' });` But when i try to insert this marker to the map `this.oMap.setMarker(oMarker)` it gives me an error i have seen in your sample app2 . you iterated throught all the markers using getMarkers(); Is there any way to set the marker to the map???
Prateek057 commented 7 years ago

Hello @vinny366 , @jasper07

May I know why you closed this issue, as I am also facing the same problem and the library does not offer a way to add additional markers. for Ex. I want to have a different icon and click operation for the current position. so essentially its a different marker. but problem I face is that I have to add all markers to a single model and then create a template using that model.

I want to just add a another marker in the end for current location with out all this hassle.

If you have an answer please let me know.

Thanks Prateek