2016-06-06 1 views
0

중국 또는 위도, 경도 GPS 데이터를 확인할 수 있습니까?lat 또는 lon 데이터가없는 경우 오프라인으로 도큐멘트를 확인하려면 어떻게해야합니까?

사용자가 중국에 머무르는 경우

STEP1. 확인 위도/경도 오프라인 FUNC

만약이 같은

중국

에 대한 사실

요청 googleGeocoding API ..

var에 googleGeocoding 다른

var chinaGoogleGeocoding="http://maps.google.cn/maps/api/geocode/json?language=en&latlng=" + pos.coords.latitude + "," + pos.coords.longitude + "&key=" + Google_API_Key; 

= "https : //로 maps.googleapis.com/maps/api/geocode/json?language=en & latlng = "+ pos.coords.latitude +", "+ pos.coords.longitude +"& key = "+ Google_API_Key;

나에게 조언 해 주시겠습니까?

나는 http://maps.google.cn이 다른 나라에서는 잘 작동하는지 확인하지만 중국에서만 사용자 체재를 사용하고 싶습니다.

http://www.latlong.net

I 110

그럼

경우 ((pos.coords.latitude 단부 중국 북은 단부 (47)와 경도 123를 시작 37 시작할 생각> = 37 & & pos.coords.latitude < = 47) & & (pos.coords.latitude> = 110 & & pos.coords.latitude < = 123)) {

// 중국 var에 chinaGoogleGeocoding = "http://maps.google.cn/maps/api/geocode/json?language=en & 위도와 경도 ="+ pos.coords.latitude + ","+ POS. coords.longitude + "& key ="+ Google_API_Key; } else { var googleGeocoding = "https://maps.googleapis.com/maps/api/geocode/json?language=en & latlng ="+ pos.coords.latitude + ","+ pos.coords.longitude + "& key ="+ Google_API_Key; }

맞습니까? (가) 중국에 대해 정의 된 지역 내에 수신 한 좌표 경우 작동하도록 정의 된 영역을 일단

답변

1

일반적으로 국가 영역이 GeoJson

같은 것을 정의 할 수 있습니다, 당신은 계산할 수 있습니다.

+0

나는 GeoJson을 시도 할 것이다. 정말 고맙습니다 :) –

관련 문제