How to display that given address is not on google map
I have two input box:
<input name="adrs" id="adrs" type="text">
<input name="city" id="city" type="text">
开发者_StackOverflow中文版
Now I want when user write this, is there any way by which i can tell the user that given address is not on google map? Any simple method , I am using EasyGoogleMap.class.php
class. Please suggest me any jquery method to show the message
You would have to geocode the address and analyze the returned data. I don't know what class you're using - maybe it already contains a geocoding function. If not, this article gives a complete rundown on how to program this in PHP.
The returned address will contain a accuracy
field.
The accuracy codes that will interest you most are
7 Intersection level accuracy.
8 Address level accuracy.
9 Premise (building name, property name, shopping center, etc.) level accuracy.
If you get a code 8 and above, you can safely assume the address is on Google Maps. If it's below, it's not, or not exactly.
You can look up all accuracy codes here.
精彩评论