Hi Jeremy,

I search for the solution and checked several posts, but it seems you are 
the only person giving the exactly what I am searching of.  

Can you please give me example code on the same or return JSON server side? 

I checked http://jory.dk/AreaGMC/MapClustering.html and seen they are also 
doing the same, It would be really helpful if you can please give me some 
code example.

Thanks for your valuable post.

On Wednesday, August 6, 2008 5:19:43 PM UTC+5:30, jgeerdes [AJAX APIs 
"Guru"] wrote:
>
> To work with the map, any solution like this is going to require two 
> parts; one server-side and one client-side.  Here's a walk through the 
> process: 
>
> STEP 1: The client-side (Javascript) portion clears the map of any 
> existing markers, harvests the viewport and zoom information from the 
> map, constructs a url for the server-side portion, including the 
> viewport and zoom information as parameters, dynamically creates a new 
> script element with the url as its src, and appends the script el to 
> the document head. 
>
> STEP 2:  The server side component uses the viewport and zoom 
> parameters to retrieve relevant points from the database which have 
> been grouped by the lat and lng coordinates into boxes of a given 
> size.  For instance, in one application that I have, I use the 
> following group by clause: 
>
> GROUP BY lat/.02*(grpThreshold-currentZoom),lng/.02*(grpThreshold- 
> currentZoom) 
>
> grpThreshold is the threshold beyond which I don't want the markers to 
> be grouped at all, and currentZoom represents the zoom level of the 
> map. 
>
> STEP 3:  Once the points are retrieved, your server-side bit generates 
> a line of Javascript that will (a) call a globally-accessible client- 
> side callback function that can relay information back to the map and 
> (b) pass that callback function an array of javascript objects that 
> will define the lat, lng, and other information for the markers. 
>
> STEP 4: The client-side portion hears this information, uses it to 
> generate a series of Markers, and adds those Markers to the map. 
> Please note that, if you have other markers on the map, you're going 
> to want to stash these markers in an array somewhere so that you can 
> remove them when the viewport changes again. 
>
> Jeremy R. Geerdes 
> Effective website design & development 
> Des Moines, IA 
>
> For more information or a project quote: 
> http://jgeerdes.home.mchsi.com 
> [email protected] 
>
> If you're in the Des Moines, IA, area, check out Debra Heights 
> Wesleyan Church!

-- 
-- 
You received this message because you are subscribed to the Google
Groups "Google AJAX APIs" group.
To post to this group, send email to
[email protected]
To unsubscribe from this group, send email to
[email protected]
To view this message on the web, visit
https://groups.google.com/d/msgid/google-ajax-search-api/4622d03f-4157-4d2e-89e2-9ba266b3ffbd%40googlegroups.com
For more options, visit this group at
http://groups.google.com/group/google-ajax-search-api?hl=en?hl=en

--- 
You received this message because you are subscribed to the Google Groups 
"Google AJAX APIs" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
For more options, visit https://groups.google.com/groups/opt_out.

Reply via email to