Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    primarykey
    data
    text
    <p>some problems in code look at this</p> <pre><code>//=========== &gt; Custom Marker Class function CustomMarker(opts) { this.location_ = null; this.div_ = null; this.inner_ = null; this.opts = { image: null } this.constructor = function(image) { this.inner_ = document.createElement('img'); jQuery(this.inner_).addClass('thumb').click(jQuery.proxy(this.onPinClick, this)); if (image) this.setImage(image); } this.setPosition = function(ll) { this.location_ = ll; } this.getPosition = function() { return this.location_; } this.onAdd = function() { var div = document.createElement('div'); div.style.border = "none"; div.style.borderWidth = "0px"; div.style.position = "absolute"; div.appendChild(this.inner_); this.div_ = div; var panes = this.getPanes(); panes.overlayMouseTarget.appendChild(div); } this.onPinClick = function(e) { google.maps.event.trigger(this, 'open'); } this.draw = function() { var overlayProjection = this.getProjection(); if (overlayProjection) { var pixPosition = overlayProjection.fromLatLngToDivPixel(this.location_); this.div_.style.left = (pixPosition.x ) + "px"; this.div_.style.top = (pixPosition.y) + "px"; } } this.setImage = function(image) { this.inner_.src = image; } this.constructor.apply(this, arguments); } CustomMarker.prototype = new google.maps.OverlayView(); //=========== &gt; Initialization var posSkopje = new google.maps.LatLng(42.007652282715,21.372894287109034); var posColorado = new google.maps.LatLng(38.960487365723,-104.76946258545001); var map = new google.maps.Map(document.getElementById("map_canvas"), { center: new google.maps.LatLng(0, 0), zoom: 3, mapTypeId: google.maps.ROADMAP, maxZoom: 20 }); var markerSkopje = new CustomMarker('http://www.gnhl.ca/images/pushed-pin-hi.png'); markerSkopje.setPosition(posSkopje); markerSkopje.setMap(map); var zoomOnClick = function(arg1) { map.setCenter(this.getPosition()); map.setZoom(20); } google.maps.event.addListener(markerSkopje, 'open', jQuery.proxy(zoomOnClick, markerSkopje)); </code></pre>
    singulars
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload