If you are not satisfied with default Google map Marker (Default google marker can only be a icon, image or shape),
for example adding a border, then you should use richmarker!
http://google-maps-utility-library-v3.googlecode.com/svn/trunk/richmarker/
Inside richmarker:
RickMarker extends from google.maps.OverlayView
RichMarker.prototype.onAdd
var panes = this.getPanes();//Returns the panes in which this OverlayView can be rendered. The panes are not initialized until onAdd is
called by the API.
panes.overlayMouseTarget.appendChild();//This pane contains elements that receive DOM mouse events, such as the
transparent targets for markers. It is above the floatShadow, so that markers in the shadow of the info window can be clickable. (Pane 5).
RichMarker.prototype.draw
var projection = this.getProjection(); //Returns the MapCanvasProjection object
associated with this OverlayView. The projection is not initialized until onAdd is
called by the API.
var latLng = (this.get('position'));
var pos = projection.fromLatLngToDivPixel(latLng);//Computes the pixel coordinates of the given geographical
location in the DOM element that holds the draggable map.
var offset = this.getOffset_();
this.markerWrapper_.style['top'] = (pos.y + offset.height) + 'px';
this.markerWrapper_.style['left'] = (pos.x + offset.width) + 'px';
相关文章
- 面经:Google两轮背靠背
- Google Earth Engine 教程——Landsat 8 影像各波段直方图统计
- Google Earth Engine(GEE)——利用map遍历实现影像的逐年筛选
- Google Earth Engine(GEE)——Map.style()让你把光标编程十字线
- Google Earth Engine(GEE)——bit位移的计算
- Google Earth Engine(GEE)——如何通过F-fold完成交叉验证
- Google Earth Engine(GEE)——MOD09A1.061 Terra Surface Reflectance数据StateQA波段去云(墨西哥为例)
- Google Earth Engine——全球建筑物GlobalMLBuildingFootprints矢量集合下载
- Google Earth Engine(GEE)——以MODIS/006/MCD19A2为例批量下载逐天AOD数据逐天的均值、最大值、最小值、标准差、方差统计分析和CSV下载(北京市各区为例)
- Google Earth Engine(GEE)——Landsat_timeSeries_map(北京市为例)
- Google Earth Engine(GEE)——如何批量给影像批处理(map)选择波段信息,用气温数据去掩膜NDVI指定值域范围。
- Google Earth Engine——WWF/HydroSHEDS/30DIR该数据集的分辨率为30弧秒。30角秒的数据集是水文条件下的DEM、排水(流)方向和流量累积。1km分辨率DEM
- Google Earth Engine——飓风最佳轨迹数据库(HURDAT2)。大西洋盆地1851-2018年。
- Google Earth Engine ——MOD16A2 V105产品以1公里的像素分辨率提供8天的全球陆地蒸发量(ET)信息
- Google Earth Engine(GEE)——注册GEE被拒绝,官网的回复给出答案
- Google Earth Engine(GEE)——创建不同等级道路一个特征集合
- ArcGIS Google Map 增加虚拟图层(MapImageLayer)(转载)
- GWT和 google Map 一起使用.