Featured post
javascript - Get country from latitude longitude -
i know how can country name latitude & longitude using javascript. open use of google maps’ javascript api. can city , zip?
edit: aim fill address field automatically, not display on map.
i don't know if works google maps, there web service returns country code , takes parameters lat , long.
here example: http://api.geonames.org/countrycodejson?lat=49.03&lng=10.2&username=demo
i found little description:
the iso country code of given point.
- webservice type: rest
- url:
ws.geonames.org/countrycode?
- parameters:
lat
,lng
,type
,lang
,radius
(buffer in km closest country in coastal areas)- result: returns iso country code given latitude/longitude
with parameter
type=xml
service returns xml document iso country code , country name. optional parameter lang can used specify language country name should in. json output producedtype=json
see docs
edit: please note demo
demonstration user , should create user account @ http://www.geonames.org/login in order use service.
- Get link
- X
- Other Apps
Comments
Post a Comment