Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- function mapMarkerConstructor () {
- class GoogleOverlayView {
- constructor(element, latlng) {
- this.element = element;
- this.latlng = latlng;
- }
- draw() {
- let panes = this.getPanes();
- let point = this.getProjection().fromLatLngToDivPixel(this.latlng);
- panes.overlayImage.appendChild(this.element[0]);
- if (point) {
- this.element.css('left', `${point.x}px`);
- this.element.css('top', `${point.y}px`);
- }
- }
- onRemove() {}
- }
- GoogleOverlayView.prototype = new google.maps.OverlayView();
- this.GoogleOverlayView = GoogleOverlayView;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement