<html><body><div style="color:#000; background-color:#fff; font-family:HelveticaNeue, Helvetica Neue, Helvetica, Arial, Lucida Grande, sans-serif;font-size:10pt"><div style="" class=""><span style="" class="">Hardik</span></div><div class="" style="color: rgb(0, 0, 0); font-size: 13.3333px; font-family: HelveticaNeue,Helvetica Neue,Helvetica,Arial,Lucida Grande,sans-serif; background-color: transparent; font-style: normal;"><br style="" class=""></div><div class="" style="color: rgb(0, 0, 0); font-size: 13.3333px; font-family: HelveticaNeue,Helvetica Neue,Helvetica,Arial,Lucida Grande,sans-serif; background-color: transparent; font-style: normal;">There are various OpenLayer classes to add markers over the map. The Vector class is more recent and more flexible then the Marker class.  Y<span style="" class="">ou should find cluster openlayers cluster examples on internet. searching for openlayers osgeo stylemap strategy cluster  new
 OpenLayers.Strategy</span></div><div class="" style="color: rgb(0, 0, 0); font-size: 13.3333px; font-family: HelveticaNeue,Helvetica Neue,Helvetica,Arial,Lucida Grande,sans-serif; background-color: transparent; font-style: normal;"><span style="" class=""><br style="" class=""></span></div><div class="" style="color: rgb(0, 0, 0); font-size: 13.3333px; font-family: HelveticaNeue,Helvetica Neue,Helvetica,Arial,Lucida Grande,sans-serif; background-color: transparent; font-style: normal;"><span style="" class="">There is also a discussion group for OpenLayers users at http://lists.osgeo.org/pipermail/openlayers-users where you should find better answers related to OpenLayers.<br style="" class=""></span></div><br style="" class="">These examples should show you how to define a strategy with a particular function to control the styleMap. You can for example group specifiying a distance. You can control the size of the marker based on the number of points.
 You can also replace with various icons.<br style="" class=""><br style="" class="">See for example this discussion : http://www.feedpopular.com/openlayers-cluster-strategy-different-styles.html<br style="" class="">and this presentation http://presentations.opengeo.org/2009_FOSS4G/ol_vector_mayhem.pdf<br> <br style="" class=""><div style="" class=""><span class="" style="font-style:italic;color:rgb(0, 0, 191);font-weight:bold;">Pierre <br style="" class=""></span><br style="" class=""></div>  <div class="" style="font-family: HelveticaNeue, Helvetica Neue, Helvetica, Arial, Lucida Grande, sans-serif; font-size: 10pt;"> <div class="" style="font-family: HelveticaNeue, Helvetica Neue, Helvetica, Arial, Lucida Grande, sans-serif; font-size: 12pt;"> <div style="" class="" dir="ltr"> <hr style="" class="" size="1">  <font style="" class="" face="Arial" size="2"> <b style="" class=""><span class="" style="font-weight:bold;">De :</span></b> Hardik
 Pancholi <hardik.pancholi@gatewaytechnolabs.com><br style="" class=""> <b style="" class=""><span class="" style="font-weight: bold;">À :</span></b> Yves <yvecai@gmail.com>; dev@openstreetmap.org <br style="" class=""> <b style="" class=""><span class="" style="font-weight: bold;">Envoyé le :</span></b> Mardi 20 mai 2014 2h48<br style="" class=""> <b style="" class=""><span class="" style="font-weight: bold;">Objet :</span></b> Re: [OSM-dev] On Zoom out markers should get combine.<br style="" class=""> </font> </div> <div style="" class=""><br style="" class=""><div style="" class="" id="yiv9648536516"><style style="" class="">#yiv9648536516 BODY{font:10pt Tahoma, Verdana, sans-serif;}</style><div style="" class="">
<font style="" class="" size="2">Hello,</font><div class="" style="font-family:Tahoma, Verdana, sans-serif;font-size:10pt;font-style:normal;font-variant:normal;font-weight:normal;line-height:normal;"><br style="" class="" clear="none"></div><div style="" class=""><font style="" class="" size="2">Thanks for early reply. I checked the examples of clustering markers. </font><h1 class="" id="yiv9648536516title" style="font-family:'Lucida Grande', Verdana, Geneva, Lucida, Arial, Helvetica, sans-serif;font-size:17px;font-style:normal;font-variant:normal;font-weight:normal;line-height:normal;margin:0px 0px 0.5em;padding:0.5em 0px 0px;border-width:0px 0px 1px;border-bottom-style:solid;border-bottom-color:rgb(252, 177, 0);vertical-align:baseline;color:rgb(0, 58, 107);"><span class="" style="font-family:Tahoma, Verdana, sans-serif;font-size:10pt;"><br style="" class="" clear="none"></span></h1><h1 class="" id="yiv9648536516title" style="margin:0px 0px
 0.5em;padding:0.5em 0px 0px;border-width:0px 0px 1px;border-bottom-style:solid;border-bottom-color:rgb(252, 177, 0);vertical-align:baseline;"><span class="" style="color:rgb(0, 58, 107);font-family:Tahoma, Verdana, sans-serif;font-size:10pt;font-style:normal;font-variant:normal;font-weight:normal;line-height:normal;">Cluster strategy threshold is the example what I want. But I am confused with use of vector layer. Here Points are used from vector layer class. In my example I am using </span><font style="" class="" color="#003a6b" size="2"><span class="" style="font-weight:normal;"> OpenLayers.Layer.Markers("Markers"). Multiple markers are there on map and I want to combine them same as in cluster example. I also want to change the color of markers and want to show the count of markers on marker icon. </span></font></h1><div style="" class=""><font style="" class="" color="#003a6b" size="2"><span class="" style="font-weight:normal;"><br
 style="" class="" clear="none"></span></font></div><div style="" class=""><font style="" class="" color="#003a6b" size="2"><span class="" style="font-weight:normal;">In clustering example I am getting the number of markers at point, but it is when I do mouse over on it. I want the count when I do Zoom In or Zoom out.</span></font></div><div style="" class=""><font style="" class="" color="#003a6b" size="2"><span class="" style="font-weight:normal;"><br style="" class="" clear="none"></span></font></div><div style="" class=""><font style="" class="" color="#003a6b" size="2">Thanks</font></div><div style="" class=""><font style="" class="" color="#003a6b" size="2">Hardik Pancholi</font></div><blockquote class="" style="font-family:Tahoma, Verdana, sans-serif;font-size:10pt;font-style:normal;font-variant:normal;font-weight:normal;line-height:normal;padding-left:5px;margin-left:5px;border-left-color:rgb(0, 0,
 255);border-left-width:2px;border-left-style:solid;margin-right:0px;"><div style="" class="" id="yiv9648536516yqtfd25467"><hr style="" class=""><b style="" class="">From:</b> Yves [mailto:yvecai@gmail.com]<br style="" class="" clear="none"><b style="" class="">To:</b> Hardik Pancholi [mailto:hardik.pancholi@gatewaytechnolabs.com], dev@openstreetmap.org<br style="" class="" clear="none"><b style="" class="">Sent:</b> Fri, 16 May 2014 16:54:12 +0000<br style="" class="" clear="none"><b style="" class="">Subject:</b> Re: [OSM-dev] On Zoom out markers should get combine.<br style="" class="" clear="none"><br style="" class="" clear="none">
Whatever lib you use for your map, the word you are looking for is 'cluster', like in 'clustering markers'.<br style="" class="" clear="none">
Yves<br style="" class="" clear="none">
<br style="" class="" clear="none"><br style="" class="" clear="none"><div style="" class="">On 16 mai 2014 16:20:23 UTC+02:00, Hardik Pancholi <<a style="" class="" rel="nofollow" shape="rect" ymailto="mailto:hardik.pancholi@gatewaytechnolabs.com" target="_blank" href="mailto:hardik.pancholi@gatewaytechnolabs.com">hardik.pancholi@gatewaytechnolabs.com</a>> wrote:<blockquote class="" style="margin:0pt 0pt 0pt 0.8ex;border-left:1px solid rgb(204, 204, 204);padding-left:1ex;">


<span class="" style="background-color:rgb(255, 255, 255);">Hello,</span><div class="" style="background-color:rgb(255, 255, 255);"><br style="" class="" clear="none"></div><div class="" style="background-color:rgb(255, 255, 255);">I am facing one problem while showing multiple markers on map. When there are multiple markers at nearest location then it looks really messy. </div><div class="" style="background-color:rgb(255, 255, 255);"><br style="" class="" clear="none"></div><div class="" style="background-color:rgb(255, 255, 255);">I want to show nearest markers as single marker and also want to show the number on that single maker, so I can know how many points are there.  This should done on basis of zoom level. </div><div class="" style="background-color:rgb(255, 255, 255);"><br style="" class="" clear="none"></div><div class="" style="background-color:rgb(255, 255, 255);">If I do zoom in then number of nearest markers count should
 decrease. On maximum zoom out number of nearest points should increase and it should be visible as single marker with count on marker.</div><div class="" style="background-color:rgb(255, 255, 255);"><br style="" class="" clear="none"></div><div class="" style="background-color:rgb(255, 255, 255);">Thanks</div><div class="" style="background-color:rgb(255, 255, 255);">Hardik Pancholi </div><pre style="" class=""></pre><hr style="" class=""><br style="" class="" clear="none">dev mailing list<br style="" class="" clear="none"><a style="" class="" rel="nofollow" shape="rect" ymailto="mailto:dev@openstreetmap.org" target="_blank" href="mailto:dev@openstreetmap.org">dev@openstreetmap.org</a><br style="" class="" clear="none"><a style="" class="" rel="nofollow" shape="rect" target="_blank" href="https://lists.openstreetmap.org/listinfo/dev">https://lists.openstreetmap.org/listinfo/dev</a><br style="" class="" clear="none"></blockquote></div><br style=""
 class="" clear="none">
-- <br style="" class="" clear="none">
Envoyé de mon téléphone Android avec K-9 Mail. Excusez la brièveté.</div></blockquote><div style="" class="" id="yiv9648536516yqtfd34161"><style style="" class="">
#yiv9648536516 BODY {font:10pt Tahoma, Verdana, sans-serif;}
</style>
</div></div></div></div><br style="" class=""><div style="" class="" id="yqtfd68003">_______________________________________________<br style="" class="" clear="none">dev mailing list<br style="" class="" clear="none"><a style="" class="" shape="rect" ymailto="mailto:dev@openstreetmap.org" href="mailto:dev@openstreetmap.org">dev@openstreetmap.org</a><br style="" class="" clear="none"><a style="" class="" shape="rect" href="https://lists.openstreetmap.org/listinfo/dev" target="_blank">https://lists.openstreetmap.org/listinfo/dev</a><br style="" class="" clear="none"></div><br style="" class=""><br style="" class=""></div> </div> </div>  </div></body></html>