vendor/assets/javascripts/map.js in flashgrid-3.1.0 vs vendor/assets/javascripts/map.js in flashgrid-3.1.1
- old
+ new
@@ -495,11 +495,16 @@
if (options.classes) {
control.className = options.classes;
}
if (options.content) {
- control.innerHTML = options.content;
+ if (typeof options.content === 'string') {
+ control.innerHTML = options.content;
+ }
+ else if (options.content instanceof HTMLElement) {
+ control.appendChild(options.content);
+ }
}
if (options.position) {
control.position = google.maps.ControlPosition[options.position.toUpperCase()];
}
@@ -786,10 +791,11 @@
});
})(el, stop_overlay_events[ev]);
}
if (options.click) {
+ panes.overlayMouseTarget.appendChild(overlay.el);
google.maps.event.addDomListener(overlay.el, 'click', function() {
options.click.apply(overlay, [overlay]);
});
}
@@ -2046,9 +2052,20 @@
j = i;
}
}
return inPoly;
+ };
+}
+
+if (!google.maps.Circle.prototype.containsLatLng) {
+ google.maps.Circle.prototype.containsLatLng = function(latLng) {
+ if (google.maps.geometry) {
+ return google.maps.geometry.spherical.computeDistanceBetween(this.getCenter(), latLng) <= this.getRadius();
+ }
+ else {
+ return true;
+ }
};
}
google.maps.LatLngBounds.prototype.containsLatLng = function(latLng) {
return this.contains(latLng);
\ No newline at end of file