We need to figure out a quick and fairly accurate method for point-in-polygon for lat/long values and polygons over google maps. After some research - came across some posts abo
In reply to zarun function for finding lat/long within polygon.
I had a property table having lat/long information. So I had to get the records whose lat/long lies within polygon lats/longs (which I got from Google API). At first I was dumb how to use the Zarun function. So here is the solution query for it.
SELECT id
FROM properties
WHERE myWithin(
PointFromText(concat( "POINT(", latitude, " ", longitude, ")")),
PolyFromText('POLYGON((37.628134 -77.458334,37.629867 -77.449021,37.62324 -77.445416,37.622424 -77.457819,37.628134 -77.458334))' )
) = 1 limit 0,50;
Hope it will save time for dumbs like me ;)