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. Java的Integer和int有什么区别

    Java是面向对象的编程语言,一切都是对象,但是为了编程的方便还是引入了基本数据类型,为了能够将这些基本数据类型当成对象操作,Java为每一个基本数据类型都引入了对应的包装类型(wrapper cla ...

  2. 《Lua程序设计》第5章 函数 学习笔记

    Lua为面向对象式的调用也提供了一种特殊的语法——冒号操作符.表达式o.foo(o, x)的另一种写法是o:foo(x),冒号操作符是调用o.foo时将o隐含地作为函数的第一个参数.Lua可以调用C语 ...

  3. hadoop集群操作常用命令

    一.HDFS相关 1.启动NameNode sbin/hadoop-daemon.sh start namenode 2.启动DataNode sbin/hadoop-<span style=& ...

  4. JS 实现拖动效果

    <html> <body style="margin:0px;"> <script src="http://ajax.googleapis. ...

  5. golang文件传输服务

    续上篇,本篇介绍一个完整的golang文件传输服务器. 完整的代码可以看服务器,客户端 网络使用的框架如上篇介绍,这里就不再复述. 首先定义3个命令码: const ( request_file = ...

  6. 【Python系列】python关键字、符号、数据类型等分类

    https://github.com/AndyFlower/Python/blob/master/sample/python前言如下部分为python关键字,操作符号,格式字符.转义字符等,以后有时间 ...

  7. Linux命令 swap:内存交换空间

    swap 内存交换空间的概念 swap使用上的限制

  8. ActiveMQ 消息持久化到数据库(Mysql、SQL Server、Oracle、DB2等)

    ActiveMQ具体就不介绍了,直接介绍如何讲ActiveMQ持久化到本地数据库,以SQL Server 2008 R2为例1.下载ActiveMQ后直接解压,我下载的是apache-activemq ...

  9. 时间的类型的相互转换(date/String)及时区的比较

    String ->Date ->String @Test public void date() throws ParseException{ String sdate = "01 ...

  10. redmine创建新闻,自动发邮件给项目组所有成员

    redmine创建新闻,自动发邮件给项目组所有成员: 1.添加用户至公共项目内 2.配置系统邮件推送配置 3.检查用户接受推送配置 3.使用管理员账户发布新闻(不能自己发送自己) 4.查看邮件接受邮件