For up to 7 markers just displacing them works quite well.

Code snippet:


var i:int;
for (i = 0; i < nStaticCount; i++) {
        nLat = Number(staticMarkers[i].Latitude);
        nLng = Number(staticMarkers[i].Longitude);

        var nCoMarkers:int = sMarkerCoincident(i,nLat,nLng);
        if (nCoMarkers>0) {
                switch(nCoMarkers)      {
                        case 1:
                                nLat = nLat + 0.0002;
                                nLng = nLng + 0.0002;
                                break;
                        case 2:
                                nLat = nLat - 0.0002;
                                nLng = nLng + 0.0002;
                                break;
                        case 3:
                                nLat = nLat + 0.0002;
                                nLng = nLng - 0.0002;
                                break;
                        case 4:
                                nLat = nLat - 0.0002;
                                nLng = nLng - 0.0002;
                                break;
                        case 5:
                                nLng = nLng + 0.0003;
                                break;
                        case 6:
                                nLng = nLng - 0.0003;
                                break;
                        }
        }

        point = new LatLng(nLat, nLng);


Where the sMarkerCoincident Function is:


private function sMarkerCoincident
(currindex:int,nlat:Number,nlong:Number):int {

var nResult:int;
var nLat:Number;
var nLng:Number;
var nLatDiff:Number;
var nLngDiff:Number;
var i:int;
for (i = 0; i < currindex; i++) {
        nLat = Number(staticMarkers[i].Latitude);
        nLng = Number(staticMarkers[i].Longitude);
        nLatDiff = Math.abs(nLat - nlat);
        nLngDiff = Math.abs(nLng - nlong);
        if ((nLatDiff < 0.00015) && (nLngDiff < 0.00015)) {
                nResult = nResult + 1;
        }
 }
return nResult;
}


On Dec 23, 1:31 pm, Terry Reinert <[email protected]> wrote:
> Great ideas! And a lot easier then the ones I had. :)
>
> Thanks.
>
> On Dec 22, 2:18 pm, "pamela (Google Employee)" <[email protected]>
> wrote:
>
>
>
> > A simpler option might be to rotate each of the marker's icons so that
> > their icons are visible and clickable. This only works for up to a few
> > markers, and may not be feasible if you're not using standard pin-like
> > markers.
> > You could open one infowindow up by default, then add an arrow to that
> > window to "cycle" to the next one. That means the user doesn't have to
> > click 2 times to get to some content.
> > Alternatively, you could use a menu that appears on mouse-over to
> > select which of the infowindows to display.
>
> > - pamela
>
> > On Wed, Dec 23, 2009 at 1:50 AM, Terry Reinert
>
> > <[email protected]> wrote:
> > > In my application there are instances where I have multiple markers
> > > with the same lat/lng contained in a MarkerClusterer. As it should,
> > > the MarkerClusterer keeps those markers in a cluster until maxZoom is
> > > reached and then it displays the markers (which of course appears as a
> > > single marker).
>
> > > I need to indicate in some manner that there is more than one marker
> > > at that location (which MarkerClusterer does) but I also need to be
> > > able to see the info windows for all the markers at that location.
> > > Since we can only open one info window at a time we can't just open
> > > all info windows for stacked markers when one of them is clicked on.
>
> > > One idea I had is to extend MarkerClusterer so that when a cluster
> > > icon is clicked on an info window appears showing which markers are
> > > contained within it and allow the user to select one of them to open
> > > that markers info window. There could be an option that would "turn
> > > on" this feature when the zoom is above a specific value.
>
> > > I could also use Flex to display the marker information and not use
> > > info windows at all but that isn't a "pure Google Maps" solution so it
> > > wouldn't be helpful to the rest of the community.
>
> > > If anyone has any thoughts or ideas on the best way to approach this
> > > that would be beneficial to the whole community I'd love to hear them.
>
> > > --
>
> > > You received this message because you are subscribed to the Google Groups 
> > > "Google Maps API For Flash" 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 
> > > athttp://groups.google.com/group/google-maps-api-for-flash?hl=en.- Hide 
> > > quoted text -
>
> - Show quoted text -

--

You received this message because you are subscribed to the Google Groups 
"Google Maps API For Flash" 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-for-flash?hl=en.


Reply via email to