Gmap3 - Forum

Gmap3 exchange platform

You are not logged in.

Ads
(server costs 27.50€ per month)

#1 2012-03-28 16:43:34

ngraupen
Member
Registered: 2012-03-28
Posts: 2

Real-Time Markers best strategies?

Hi, I'm working with API3, I'm doing an application like http://transport.wspgroup.fi/hklkartta/defaultEn.aspx , but to i'm  tracking position for Ambulances.

I want to know, what is the best strategies to remove and add markers, now use an array of markers, and if i have in my markers the ambulance i change the position using marker.setPosition(new google.maps.LatLng(latitude, Longitude)) only for this specific marker, But i see like all markers disapear and appear, is a very extrange behivor.

I see a lot of sites, but i don't see examples for real-time changing position best practices or good strategies for makers, can someone give me a recommendation?

Regards!
Nicolas.

Offline

Ads
(server costs 27.50€ per month)

#2 2012-03-29 12:04:31

charlietfl
Moderator
Registered: 2011-11-24
Posts: 201

Re: Real-Time Markers best strategies?

If all the markers are being affected there is something wrong in your code. Post a link to a page that demonstrates the problem

Offline

#3 2012-03-29 21:11:47

jbdemonte
Administrator
From: Pourrières, France
Registered: 2011-11-21
Posts: 474

Re: Real-Time Markers best strategies?

you shoud use the tag to add a "name" or an "id" to your markers and then clear it or update thanks to tags

Offline

#4 2012-03-30 13:16:00

ngraupen
Member
Registered: 2012-03-28
Posts: 2

Re: Real-Time Markers best strategies?

jbdemonte wrote:

you shoud use the tag to add a "name" or an "id" to your markers and then clear it or update thanks to tags

Thanks, i do that and works well!

Offline

#5 2012-04-01 08:22:58

jasper@grannetia.com
Member
Registered: 2012-03-21
Posts: 4

Re: Real-Time Markers best strategies?

What if you would want to do this for other overlays like polylines? Obviously, a polyline has different properties from a marker, but what is I want to, for instance, want to change the stroke color of an already created polyline. Can I use the tag of the polyline that I set when I created it to get at it? How would I do that?

Thnx!

Jasper

Offline

#6 2012-04-01 10:01:45

jbdemonte
Administrator
From: Pourrières, France
Registered: 2011-11-21
Posts: 474

Re: Real-Time Markers best strategies?

Tags are for everything and in next version, will be extended to allow to use callback functions

Offline

Board footer

Powered by FluxBB