On Aug 3, 12:31 pm, Arun <[email protected]> wrote:
> Hi Everyone,
>  I want to implement geofencing in my map. A boundary like a circle,
> rectangle etc. is specified and if a vehicle comes into that area an
> alert has to be sent. Is there any way to implement it other than
> using polygens

Polygons is easy because Mike's EPoly extension adds a .contains
method. But if you don't want to use polygons, you are limited to
calculations and if statements like the following pseudocode:

if (vehicle.lng < east) and (vehicle.lng > west) and (vehicle.lat >
south) and (vehicle.lat < north) then { inside rectangle }

The conditions and calculations are more complicated for a circle; and
for an irregular shape it's likely to impossible other than by using a
polygon.

Andrew
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"Google Maps API" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to 
[email protected]
For more options, visit this group at 
http://groups.google.com/group/Google-Maps-API?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to