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. 学习下新塘M0芯片的下载方法

    编程方式多种多样,解释这几种方式的原理,方便做后续的回答: 一.脱机 脱机的意思就是脱离PC机,有很多芯片必须连接PC才能烧录,比如某些FPGA芯片.MCU芯片.NAND Flash芯片等.脱机和在线 ...

  2. C#实现HTTP请求文件下载,GET、POST请求的数据流接收

    做项目的时候由于插件Phaser请求audio的时候,不允许跨域,具体提示====> 已拦截跨源请求:同源策略禁止读取位于 http://ttyouni.com/1.mp3 的远程资源.(原因: ...

  3. PHP中常见问题总结

    [1]页面之间无法传递变量 get,post,session在最新的php版本中自动全局变量是关闭的,所以要从上一页面取得提交过来得变量要使用$_GET['foo'],$_POST['foo'],$_ ...

  4. Linux终端多用户通信实用命令

    一  命令 1.1 write 该命令将当前终端(源)输入的字符拷贝至目标用户的终端,从而发送消息给系统中某个用户.用法如下: #write <user> <msg> [Ctr ...

  5. 【WinForm程序】注册热键快捷键切换

    重写DefWndProc事件 #region Window 消息捕获 const int WM_COPYDATA = 0x004A; public struct COPYDATASTRUCT { pu ...

  6. Nginx反向代理腾讯云COS的一个坑

    版权声明:本文由黄希彤   原创文章,转载请注明出处: 文章原文链接:https://www.qcloud.com/community/article/668639001484812620 来源:腾云 ...

  7. jQuery的parseHTML方法

    // data html字符串    // context 如果指定了context,则碎片将在此范围内被创建,默认是document    // keepScripts 如果是true,则将有scr ...

  8. python的高级特性:切片,迭代,列表生成式,生成器,迭代器

    python的高级特性:切片,迭代,列表生成式,生成器,迭代器 #演示切片 k="abcdefghijklmnopqrstuvwxyz" #取前5个元素 k[0:5] k[:5] ...

  9. java.lang.NoClassDefFoundError: Could not initialize class xxx 原因

    一.问题及原因 程序里有个工具类,主要是调用它的静态方法来发送mq. 调用场景如下: 结果这两天报了个错: java.lang.NoClassDefFoundError: Could not init ...

  10. Unity3D动作资源(AnimatinClip)优化

    能做到去掉Scale曲线,降低浮点精度 using System; using UnityEngine; using System.Collections; using System.Collecti ...