googlemap move markers

marcick

Well-Known Member
Licensed User
Longtime User
from tons of examples of googlemap api, I have grabbed a piece of html code that show a map in a webview with some markers.
Now I want to modify marker appearance and position....
What I still have to understand is: is it possible, once I see the map, to change the position of the markers without reloading the map? Or simply chanche de icon or the text in the baloon?
I would like to reload the map only when the user zoom and pan, or when I have to add a new marker outside of the map bounds.
Any hints?
Marco
 

marcick

Well-Known Member
Licensed User
Longtime User
Yes klaus,
I have surfed a bit throught many examples and your great job also, but this point is still not clear to me: is it possible to change marker icon, position, baloon, etc without reloading the map?
Which is the key to obtain this? Event listener? need webviewextra? javascript?
Just a hint, then I will study. ...
Marco
 
Upvote 0

klaus

Expert
Licensed User
Longtime User
is it possible to change marker icon, position, baloon, etc without reloading the map?
It's quite some time that I haven't played with this.
I'm not sure if you can modify any value without reloading the map.
The baloon has never worked, at least I didn't get it to work.
For this you need the WebViewExtra libray. You can search the forum there are quite some threads about the WebViewExtra libray.
What works is moving a marker and get the new position into B4A without reloading the map.

Best regards.
 
Upvote 0

marcick

Well-Known Member
Licensed User
Longtime User
I found many example on google map API tutorial and grabbing HTML code from those example now I can show a map with multiple markets, custom pushpin, auto zoom and balloon with custom text.
But as I'm asking here, I don't know how to simply hide or move a marker without reloading the map.
I'll try to study more and understand if webviewextra do this job but to be honest, it seems to me not ....
Marco
 
Upvote 0

warwound

Expert
Licensed User
Longtime User
In your map javascript you need to use the Marker setPosition() method to change it's position.

There is also a Marker setVisible() method that you can use to hide a Marker.

No need to reload the map whatsoever.

Martin.
 
Upvote 0

marcick

Well-Known Member
Licensed User
Longtime User
Martin, My I ask you a private help?
It will be "appreciated", if you guess what I mean.
Marco
 
Upvote 0

warwound

Expert
Licensed User
Longtime User
Sure no problems!

Can you let me have a copy of the web page files and i'll take a look.

PM me if you want an email address to send them to instead of attaching them to a post.

Martin.
 
Upvote 0
Cookies are required to use this site. You must accept them to continue using the site. Learn more…