InfoWindow capabilities

Discussion created by langdonx on May 13, 2013
I'm trying to fix some bugs with the ClusterLayer example and I'm having a little bit of trouble understanding the capabilities of InfoWindow.  If you go to the ClusterLayer example (link below) and click on one of the clustered points (try the one with "3" nearer the top).  When the InfoWindow  shows up, you're able to do 1 of 2 things... (1) navigate through the clustered points using the left/right arrows atop the InfoWindow (I'm assuming this is built in), or (2) actually click on the individual points.

It works perfectly fine if you just use the left/right arrows with your mouse -- you'll see the content of the InfoWindow change, and the points will be highlighted with a light-blue reticle/crosshair.  The problem is when you try to click on the individual points of interest:

  • the reticle/crosshair never moves away from the first item

  • you lose the "(1 of 3)" text from the title of the InfoWindow

  • now that the info window has jumped to the location of the point you've clicked on, it feels like it should move when you navigate left/right... or perhaps just stay anchored to the cluster

Is the InfoWindow capable of handling all of this?  Maybe it's not meant to handle different points on the map?

The code uses a method on InfoWindow called "setFeature", but I can't find any documentation on it in the API.  As best I can tell, it's partially responsible for setting the InfoWindow's content, and fully responsible for setting up the left/right navigation.  I said "partially" before, because the method also displays the InfoWindow's content, but since the cluster point has no content, it doesn't actually do anything... but DOES do something those times when you click on a single point within the cluster...

All that said, am I better off just rolling my own InfoWindow if I want all of this functionality, or is it something InfoWindow should be able to handle?