Theme Assets
This commit is contained in:
14
assets/vendor/gmaps/lib/gmaps.geofences.js
vendored
Normal file
14
assets/vendor/gmaps/lib/gmaps.geofences.js
vendored
Normal file
@@ -0,0 +1,14 @@
|
||||
GMaps.prototype.checkGeofence = function(lat, lng, fence) {
|
||||
return fence.containsLatLng(new google.maps.LatLng(lat, lng));
|
||||
};
|
||||
|
||||
GMaps.prototype.checkMarkerGeofence = function(marker, outside_callback) {
|
||||
if (marker.fences) {
|
||||
for (var i = 0, fence; fence = marker.fences[i]; i++) {
|
||||
var pos = marker.getPosition();
|
||||
if (!this.checkGeofence(pos.lat(), pos.lng(), fence)) {
|
||||
outside_callback(marker, fence);
|
||||
}
|
||||
}
|
||||
}
|
||||
};
|
||||
Reference in New Issue
Block a user