[OpenLayers-Users] Calling a feature popup from within a cluster popup

Tobias Reinicke ramotswa at gmail.com
Fri Oct 5 03:10:57 PDT 2012


If your cluster popup already shows the list of features, then you could
build a link for each feature that, when clicked you just call
map.zoomToExtent(feature.bounds); and then to open the popup either fake a
clickevent on it or initiate the popup by calling  function
onFeatureSelect(feature) with the feature passed in.

Just a note, a bit like on that example there, if  you have enough features
(> your cluster threshold) on exactly the same coordinate you will never
get rid of the clustered icon thing. But using the theory above you should
still manage to display the individual popup.

Toby

On 5 October 2012 00:52, James Morley <james at jamesmorley.net> wrote:

> I have a map where cluster popups display a list of features. I want each
> of these to have a 'display' / 'zoom to' link within the popup that takes
> users directly to the popup as if they accessed it by manually zooming in
> until the cluster disappeared.
>
> Hope that makes sense! You can see the type of map I'm talking about at
> http://www.whatsthatpicture.com/flickr/commons-osmtest-v3.5.htm
>
> Does anyone have any examples of this in action? Or any tips how it might
> work?
>
> Thanks
>
> --
> ---
> James Morley
> www.jamesmorley.net / @jamesinealing
> www.whatsthatpicture.com / @PhotosOfThePast
> www.apennypermile.com
>
> _______________________________________________
> Users mailing list
> Users at lists.osgeo.org
> http://lists.osgeo.org/mailman/listinfo/openlayers-users
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/openlayers-users/attachments/20121005/6c679c06/attachment-0001.html>


More information about the Users mailing list