how to add borders for a google map marker 谷歌地图 自己定义图钉
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 谷歌地图 自己定义图钉的更多相关文章
- Google Map Api 谷歌地图接口整理
一:基本知识: 1. 使用谷歌地图 API 的第一步就是要注册一个 API 密钥,需要注重一下两点: 1.假如使用 API 的页面还没有发布,只是在本地调试,可以不用密钥,随便用个字符串代替就可以了. ...
- 利用 Google API 调用谷歌地图 演示1
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/ ...
- Android中Google地图路径导航,使用mapfragment地图上画出线路(google map api v2)详解
在这篇里我们只聊怎么在android中google map api v2地图上画出路径导航,用mapfragment而不是mapview,至于怎么去申请key,manifest.xml中加入的权限,系 ...
- 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 ...
- Google Map API 使用总结
Google Map API (一):显示一个最基本的地图 1 实现一个地图:<head>中引用: <script type="text/javascript" ...
- 爬坑之路---Google map
google.maps.event.adddDomListen(window, 'load', callback);当文档流中所有的dom加载完成后,执行回调函数,可以不用在script中使用defe ...
- Android Google Maps 监听地图缩放
接上篇.http://www.cnblogs.com/maomishen/p/3556297.html 由于公司项目要求,需要对google map监听地图的缩放(zoom)来进行一些操作. 但是在网 ...
- Google Map 自定义 infowindow
最近做的东西用到了infowindow,不过google提供的样式太难看了,于是想改变一下样式.看了一下好像infowindow的样式不太好改. 查了半天资料,看到一个infobox,感觉真的挺好用. ...
- JavaFX結合 JDBC, Servlet, Swing, Google Map及動態產生比例圖 (1):NetBeans 寫 Servlet (转帖)
JavaFX結合 JDBC, Servlet, Swing, Google Map及動態產生比例圖 (1):NetBeans 寫 Servlet 功能:這支程式的主要功能是將 javafx 與 swi ...
随机推荐
- linux C 调用shell程序执行
#include<stdio.h> #include <unistd.h> #include <sys/types.h> #include <stdlib.h ...
- GCC 编译详解[转]
转自http://www.cnblogs.com/azraelly/archive/2012/07/07/2580839.html GNU CC(简称为Gcc)是GNU项目中符合ANSI C标准的编译 ...
- codeforces水题100道 第七题 Codeforces Round #270 A. Design Tutorial: Learn from Math (math)
题目链接:http://www.codeforces.com/problemset/problem/472/A题意:给你一个数n,将n表示为两个合数(即非素数)的和.C++代码: #include & ...
- Java读取maven目录下的*.properties配置文件
public class ReadProperties{ private static String proFileName = "/config/MQSubjectId.propertie ...
- JBuilder+struts一个常见异常
[org.apache.commons.digester.Digester]-[ERROR] Parse Error at line 3 column 22: The content of eleme ...
- 【变态问题】在发现“XXXX”类型前实体框架已使用默认 DbConfiguration 实例。
今天在调试MVC反射调用EF写的dll 一直报错如下: 在发现“VipHallDbConfiguration”类型前实体框架已使用默认 DbConfiguration 实例.“VipHallDbCon ...
- [原]RHEL7/Centos 7将网卡名称改为eth0
======问题===== rhel的网卡为enoxxxxxxxxx =====原因====== 从CentOS/RHEL7起,可预见的命名规则变成了默认.这一规则,接口名称被自动基于固件,拓扑结构和 ...
- for,for-each,for-in,for-of,map的比较
参考: 全面解析JavaScript里的循环方法之forEach,for-in,for-of Iterator 和 for...of 循环 JavaScript Array 对象 常规for for循 ...
- js获取文件对象
- C3P0连接池配置(C3P0Utils.java)
配置文件 c3p0-config.xml <?xml version="1.0" encoding="UTF-8"?> <c3p0-confi ...