On Dec 5, 4:14 pm, Hekuran <[EMAIL PROTECTED]> wrote:
> Should I create markers on index and then just setLatLng from the
> periodical loading script? how can I define marker1 as global so I can
> use marker1.setLatLng(GLatLng.fromUrlValue('42.6252928,
> 21.1618208')); from periodical loading script?
Google has a search engine...
http://www.google.com/search?hl=en&q=javascript+global+variables&aq=f&oq=
>
> Thanks.
> h.
>
> On Dec 5, 3:12 am, Mike Williams <[EMAIL PROTECTED]> wrote:
>
>
>
> > marker1 is local to your refreshMarker() function.
>
> > Your gmap.removeOverlay(marker1) is in global context, so it can't
> > access it.
>
> > Note that it's more efficient to use
> > marker1.setLatLng(GLatLng.fromUrlValue('42.6252928, 21.1618208'));
> > than to create a new icon and marker every time, and there's no need to
> > call the geocoder. Or to include the non-existent myInfo.js script.
>
> > --http://econym.org.uk/gmap
> > The Blackpool Community Church Javascript Team- Hide quoted text -
>
> - Show quoted text -
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups
"Google Maps API" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at
http://groups.google.com/group/Google-Maps-API?hl=en
-~----------~----~----~----~------~----~------~--~---