On Mar 11, 4:22 pm, lestad <[email protected]> wrote:
> Necesito saber si  un punto está dentro de un polígono  tomando como
> base las coordenadas antes capturadas para formar dicho polígono.
> Yo he pensado solucionarlo de esta manera:
> 1.      Calcular el área del polígono por medio de triangulación.
> 2.      Anadir el punto a verificar como un vértice del polígono.
> 3.      Calcular el área del polígono junto con el nuevo vértice.
> 4.      Si el área de dicho polígono es mayor que la del polígona inicial
> el punto se encuentra fuera del polígono, de lo contrario si es menor
> se encuentra adentro del polígono.
> Este proceso se lleva  a cabo antes de mostrar dicho polígono y punto
> el mapa por eso es que se tienen que utilizar métodos o formulas
> distintas a la de la API de Google Maps.
> Agradecería sus opiniones sobre lo que deseo llevar a cabo y la
> manera.

http://translate.google.com/translate?prev=hp&hl=en&u=http://groups.google.com/group/Google-Maps-API/browse_frm/thread/3ee799dc6df7c4bb%3Fhl%3Den%23&sl=es&tl=en

> What if a point is inside a polygon drawing
> base coordinates to be captured before the polygon.
> I thought to fix it this way:
> 1. Calculate the area of the polygon through triangulation.
> 2. Add a check point as a vertex of the polygon.
> 3. Calculate the area of the polygon with the new vertex.
> 4. If the area of the polygon is greater than that of the initial
> the point is outside the polygon, otherwise if it is less
> lies inside the polygon.
> This process is performed before displaying the polygon and point
> the map is that we have to use methods or formulas
> than that of the Google Maps API.
> I would appreciate your views on what you want to perform and
> way.


If you want to know if a polygon contains a point, try:
http://econym.org.uk/gmap/epoly.htm

the epoly .Contains(latlng) method

  -- Larry
--~--~---------~--~----~------------~-------~--~----~
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