Sha256: 5b1d27e08db4998e1611a5af686f058e09ddff7816a29b51857ce2ff64e330dd

Contents?: true

Size: 449 Bytes

Versions: 42

Compression:

Stored size: 449 Bytes

Contents

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);
      }
    }
  }
};

Version data entries

42 entries across 42 versions & 2 rubygems

Version Path
wbase-0.3.20 lib/vendor/admin/gmaps/lib/gmaps.geofences.js
wbase-0.3.19 lib/vendor/admin/gmaps/lib/gmaps.geofences.js
wbase-0.3.18 lib/vendor/admin/gmaps/lib/gmaps.geofences.js
wbase-0.3.17 lib/vendor/admin/gmaps/lib/gmaps.geofences.js
wbase-0.3.16 lib/vendor/admin/gmaps/lib/gmaps.geofences.js
wbase-0.3.15 lib/vendor/admin/gmaps/lib/gmaps.geofences.js
wbase-0.3.14 lib/vendor/admin/gmaps/lib/gmaps.geofences.js
wbase-0.3.13 lib/vendor/admin/gmaps/lib/gmaps.geofences.js
wbase-0.3.12 lib/vendor/admin/gmaps/lib/gmaps.geofences.js
wbase-0.3.11 lib/vendor/admin/gmaps/lib/gmaps.geofences.js
wbase-0.3.10 lib/vendor/admin/gmaps/lib/gmaps.geofences.js
wbase-0.3.9 lib/vendor/admin/gmaps/lib/gmaps.geofences.js
wbase-0.3.8 lib/vendor/admin/gmaps/lib/gmaps.geofences.js
wbase-0.3.7 lib/vendor/admin/gmaps/lib/gmaps.geofences.js
wbase-0.3.6 lib/vendor/admin/gmaps/lib/gmaps.geofences.js
wbase-0.3.5 lib/vendor/admin/gmaps/lib/gmaps.geofences.js
wbase-0.3.4 lib/vendor/admin/gmaps/lib/gmaps.geofences.js
wbase-0.3.3 lib/vendor/admin/gmaps/lib/gmaps.geofences.js
wbase-0.3.2 lib/vendor/admin/gmaps/lib/gmaps.geofences.js
wbase-0.3.1 lib/vendor/admin/gmaps/lib/gmaps.geofences.js