ClusterMarker: Dynamic Sidebar Here's a modification of ClusterMarker that i started working on a few months back. My plan was to get this working then release an updated ClusterMarker with the dynamic sidebar modifications. Unfortunately i've yet to find time to do so, but have decided to publish this map just so that any map developers interested can see it working. By the way i'm using the term sidebar even though on this map the sidebar is in fact at the bottom of the map! Moving the sidebar to the bottom of the map simply increased space available for sidebar menu items. Main features to see: - Change of cluster marker icon - the smaller one looks better i think.
- Sidebar menu items for clustered markers have a transparent background. Click one of these menu items and the map will zoom to uncluster the marker whose menu item you clicked on and the marker will open it's infowindow.
- Sidebar menu items for unclustered markers have a light gray background. Clicking such a menu item will have the same effect as simply clicking the marker.
- Hover over any cluster marker and the menu items for all markers within that cluster change background color to green.
- A marker whose infowindow is open will have it's menu item style changed to give it a 3D 'clicked' look. Close an infowindow and the menu item style will return to it's original style.
- Zoom and pan the map and the contents of the sidebar will change - only displaying menu items for markers (clustered and unclustered) that are within the map bounds plus any border padding.
Post any comments or questions regarding this map in the Discussion Forum, and please note that the version of the ClusterMarker.js script used on this map is very much an alpha version and not intended for use on non-development maps. Contact me if you want a copy of the latest modified ClusterMarker.js script with sidebar modifications. ClusterMarker: Dynamic Sidebar Map ClusterMarker: Dynamic Icons As requested here's a demo of a modification to use different icons for cluster markers based upon the number of markers within each cluster. See this forum post for more details. ClusterMarker: Dynamic Icons ClusterMarker: minClusterSize A modification here that uses a new constructor option minClusterSize to specify a minimum number of markers for which to create a cluster marker. For more details please read this forum post. ClusterMarker: minClusterSize ClusterMarker: Index
Posted by martin
on August 22 2008 12:26:01
| 7260 Reads ·
|
|