How to add borders for a Google Map marker custom map dingtalk

Source: Internet
Author: User
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 shoshould 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 ';

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.