sql - How to plot Polyline Area, i.e. service coverage area, and also check to see if visitor's address lies within that area using Google Maps API and PHP? -


i owner of business building new website application. partner programmer doing development , neither 1 of has real in-depth experience google map api or it's polyline/polygon area capabilities.

we need easy way capture inputs within our user admin area our locations can enter service coverage area info i.e. 1st street north of jones blvd, or 5 mile radius location address, etc. , have google map api plot polyline borders.

then, visitors our site need able see info when view google map 1 of our locations , see if service address falls within service area or not. need set flag somehow trigger notification visitor address not eligible service or delivery.

if can assist (example php code interface suggested apis preferred , ideal don't understand complexities of google api, polyline coordinate capture tool, etc), appreciated, have struggled figure out how create in php , more importantly how integrate our existing site.

update: thank answer codemeit...how recommend capture these longlats in our sql database...i.e. field format or type , need have separate fields long , lat, , how can standardize locations, i.e. how many long , lats needed create polygon area, want able have our location managers input info own locations user login areas.

draw polygon on map

you can draw polygons covering service area on google map. polygons defined set of latlongs can collect google earth , sasve them somewhere. once had coordinates can cover each service area, can see link find out how draw them on google map

google map polygons sample

check if user within service area

if user had address information entered or stored somewhere, can take address google map geocoding service find out address's latitude , longitude.

google map geocoding service api

after getting address' coordinate, code can check if coordinateis within bound of polygons of service area. if false, out of service area.

php checking point in polygon


Comments

Popular posts from this blog

windows - Why does Vista not allow creation of shortcuts to "Programs" on a NonAdmin account? Not supposed to install apps from NonAdmin account? -

c++ - How do I get a multi line tooltip in MFC -

unit testing - How to mock PreferenceManager in Android? -