Martin,

Really I appreciate your help. I have to try what you said. But in my
case, I have KML file, so I am not creating anything my self.
I am using GMap2 and  GGeoXml to create the Map from KML file
Can I get the markers list from created map based on current zoom or
view?

On Sep 29, 3:34 pm, Martin <[EMAIL PROTECTED]> wrote:
> Hi.
>
> I'm developing a dynamic sidebar on my map 
> here:http://martinpearman.co.uk/searchwestnorfolk/map/map.php
>
> It's a modified version of my ClusterMarker 
> script:http://googlemapsapi.martinpearman.co.uk/clustermarker/
>
> You could do much the same without ClusterMarker though.
>
> As you create your markers store them in an array.
>
> Add moveend and zoomend event listeners to your 
> map:http://code.google.com/apis/maps/documentation/reference.html#GEvent
>
> When a moveend or zoomend event is triggered, get the map bounds using
> the getBounds() 
> method:http://code.google.com/apis/maps/documentation/reference.html#GMap2
>
> Now loop through your array of markers and rebuild your sidebar HTML.
>
> Get each marker's position using getLatLng() 
> method:http://code.google.com/apis/maps/documentation/reference.html#GMarker
>
> Check to see if each marker is contained by the map bounds using the
> GLatLngBounds contains() 
> method:http://code.google.com/apis/maps/documentation/reference.html#GLatLng...
>
> If a marker is contained within the map bounds then create a sidebar
> entry for it.
>
> Once you've finished looping through your markers update the element
> that contains the sidebar with the new sidebar HTML.
>
> That's the basic idea - if you make a start and get stuck then post
> again with a link to your map and me or someone else will help
> further.
>
> Martin.
>
> On 29 Sep, 18:11, Jay32 <[EMAIL PROTECTED]> wrote:
>
> > Hi Guys,
>
> > Thanks in advance. Here is the problem. I would like to show the US
> > map with markers and related links(for example 30 markers in US) in
> > the side bar. When I am zooming more, that means going to a state
> > leven(example New York), the side bar links should decrease(for
> > example 5 markers might be for New York). How can we achieve this? Is
> > there any property to set between zoom/view and side bar? If there is
> > any online example, please let me know.
>
> > Thanks
> > Jay
>
>
--~--~---------~--~----~------------~-------~--~----~
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
-~----------~----~----~----~------~----~------~--~---

Reply via email to