 
						GMAP3 插件用来将Google Maps插入到网页中,Google在其产品中已经提供了很简便的方法。但是GMAP3这个jQuery插件提供了更加简便的方法,特别是在使用一些高级功能时(如:overlays和callbacks)
本示例显示使用集群功能的列表。
而Mac Donald的列表存储在一个JSON对象。
要渲染集群,这个例子使用在CSS文件中定义了一些类(群集cluster-1,集群2,集群3)。
尽量放大,并在进出的标记移动鼠标。
| 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 | $("#test").gmap3({  map:{    options: {      center:[46.578498,2.457275],      zoom: 5,      mapTypeId: google.maps.MapTypeId.TERRAIN    }  },  marker: {    values: macDoList,    cluster:{      radius:100,      // This style will be used for clusters with more than 0 markers      0: {        content: "<div class='cluster cluster-1'>CLUSTER_COUNT</div>",        width: 53,        height: 52      },      // This style will be used for clusters with more than 20 markers      20: {        content: "<div class='cluster cluster-2'>CLUSTER_COUNT</div>",        width: 56,        height: 55      },      // This style will be used for clusters with more than 50 markers      50: {        content: "<div class='cluster cluster-3'>CLUSTER_COUNT</div>",        width: 66,        height: 65      }    },    options: {    },    events:{      mouseover: function(marker, event, context){        $(this).gmap3(          {clear:"overlay"},          {          overlay:{            latLng: marker.getPosition(),            options:{              content:  "<div class='infobulle"+(context.data.drive ? " drive": "")+"'>"+                          "<div class='bg'></div>"+                          "<div class='text'>"+ context.data.city + " ("+ context.data.zip + ")</div>"+                        "</div>"+                        "<div class='arrow'></div>",              offset: {                x:-46,                y:-73              }            }          }        });      },      mouseout: function(){        $(this).gmap3({clear:"overlay"});      }    }  }}); | 
特别申明:
			本站所有资源都是由网友投稿发布,或转载各大下载站,请自行检测软件的完整性!
			本站所有资源仅供学习与参考,请勿用于商业用途,否则产生的一切后果将由您自己承担!
			如有侵权请联系我们删除下架,联系方式:lei1294551502@163.com