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';

how to add borders for a google map marker 谷歌地图 自己定义图钉的更多相关文章

  1. Google Map Api 谷歌地图接口整理

    一:基本知识: 1. 使用谷歌地图 API 的第一步就是要注册一个 API 密钥,需要注重一下两点: 1.假如使用 API 的页面还没有发布,只是在本地调试,可以不用密钥,随便用个字符串代替就可以了. ...

  2. 利用 Google API 调用谷歌地图 演示1

    <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/ ...

  3. Android中Google地图路径导航,使用mapfragment地图上画出线路(google map api v2)详解

    在这篇里我们只聊怎么在android中google map api v2地图上画出路径导航,用mapfragment而不是mapview,至于怎么去申请key,manifest.xml中加入的权限,系 ...

  4. Google Map API V3开发(1)

    Google Map API V3开发(1) Google Map API V3开发(2) Google Map API V3开发(3) Google Map API V3开发(4) Google M ...

  5. Google Map API 使用总结

    Google Map API (一):显示一个最基本的地图 1 实现一个地图:<head>中引用: <script type="text/javascript" ...

  6. 爬坑之路---Google map

    google.maps.event.adddDomListen(window, 'load', callback);当文档流中所有的dom加载完成后,执行回调函数,可以不用在script中使用defe ...

  7. Android Google Maps 监听地图缩放

    接上篇.http://www.cnblogs.com/maomishen/p/3556297.html 由于公司项目要求,需要对google map监听地图的缩放(zoom)来进行一些操作. 但是在网 ...

  8. Google Map 自定义 infowindow

    最近做的东西用到了infowindow,不过google提供的样式太难看了,于是想改变一下样式.看了一下好像infowindow的样式不太好改. 查了半天资料,看到一个infobox,感觉真的挺好用. ...

  9. JavaFX結合 JDBC, Servlet, Swing, Google Map及動態產生比例圖 (1):NetBeans 寫 Servlet (转帖)

    JavaFX結合 JDBC, Servlet, Swing, Google Map及動態產生比例圖 (1):NetBeans 寫 Servlet 功能:這支程式的主要功能是將 javafx 與 swi ...

随机推荐

  1. Android学习之Dialog

    在Android开发中,我们经常会需要在Android界面上弹出一些对话框,比如询问用户或者让用户选择.这些功能我们叫它Android Dialog对话框; 实例如下: 1.效果图: 2.XML代码: ...

  2. OpenCV——轮廓特征描述

    检测出特定轮廓,可进一步对其特征进行描述,从而识别物体. 1. 如下函数,可以将轮廓以多种形式包围起来. // 轮廓表示为一个矩形 Rect r = boundingRect(Mat(contours ...

  3. Objective-c官方文档 怎么使用对象

    版权声明:原创作品,谢绝转载!否则将追究法律责任.   对象发送和接受消息 尽管有不同的方法来发送消息在对象之间,到目前位置是想中括号那样[obj doSomeThing]:左边是接受消息的接收器,右 ...

  4. 【技术分享会】 iOS开发简述

    前言 Objective-C(简称OC)也是面向对象的编程语言,运用的许多面向对象的编程思想和C# . Java .C++等变成语言都是相通的: 本次技术讲座主要讲一些设计模式.设计思想等计算机语言通 ...

  5. Delete触发器

  6. C# mongohelper的初始化及账户密码设置

    MongoClientSettings mongoSettings = new MongoClientSettings(); TimeSpan t = ); mongoSettings.Connect ...

  7. 安装ORACLE_RAC遇到的问题与解决方法

    while running: /u01/app/oracle/product/10.2.0/db_1/root.sh Checking to see if Oracle CRS stack is al ...

  8. git服务器

    1 关于版本控制版本控制是一种记录一个或若干文件内容变化,以便将来查阅特定版本修订情况的系统.有以下三种版本控制系统:1. 本地版本控制系统许多人习惯用复制整个项目目录的方式来保存不同的版本,或许还会 ...

  9. Visual C++ 2010项目在Visual Studio 2013中打开.rc文件提示"undefined keyword or key name: SS_REALSIZECONTROL"解决方法

    1.以方式打开.rc文件. 2.删除其中包含SS_REALSIZECONTROL定义的内容. 3.在资源编辑器中打开.rc文件,重新设置Real Size Control的属性(不能在代码编辑器里重新 ...

  10. linux编码问题小节

    今天又碰到了难缠的python编码问题,首先主要还是linux操作系统中的编码问题. 无论怎么样,我都没办法在linux的vim中利用中文输入法打出中文? vim中的set encoding,set ...