2015-10-14 54 views
2

我看了很多做題指的是類似的話題:截至2015年,有沒有辦法通過Google Maps API獲取意大利郵政編碼的界限?

Google Maps API V3: How to get region border coordinates (polyline) data?

Google has started highlighting search areas in Pink color. Is this feature available in Google Maps API 3?

Add "Search Area" outline onto google maps result

Where do Google and Twitter source political boundaries of cities, regions and states?

,並尋找我的國家內,太在線工具和工具:

https://market.mashape.com/vanitysoft/boundaries-io/overview https://market.mashape.com/vanitysoft/boundaries-io http://mapit.openpolis.it/postcode/00188.html

但是,沒有他們中的一個(爲什麼解釋我必須做的任務之後,我告訴你)與我需要完成的任務適合:

基本上所有我想要的是,每個意大利郵編(稱爲在意大利CAP)(截至2015年,他們是8709,我把它們都存儲在數據庫中的表),發現其面積座標(因此像用以下結構的陣列(它可以是JSON,KML,XML,只要協調是真實的,我就可以在某種方式解析它們):

[ 
    [ [lat, lng], [lat, lng], [lat, lng], ... ], // Polygon 1 
    /* 
    * This additional arrays may be here in the case 
    * where a CAP (Italian postal code) is made up of many areas, 
    * therefore each area is a polygon. 
    * 
    * For example here -> https://www.google.it/maps/place/84020+SA/@40.605482,15.1783416,10.32z/data=!4m2!3m1!1s0x13396999456508e7:0x1c09e123127ecbc0 
    *  
    */ 
    [ [lat, lng], [lat, lng], ... ], // Optional Polygon 2 
    ... 
    [ [lat, lng], [lat, lng], ... ] // Optional Polygon n 
]; 

所以,我可以用一個google.maps.Polygon或自定義覆蓋延伸的地圖上google.maps.OverlayView類繪製它們。我需要的區域的座標是由谷歌所示:

https://www.google.it/maps/place/20122+Milano/@45.4628212,9.1931976,13z/data=!4m2!3m1!1s0x4786c6af4dceb2f5:0x1c0678057ae1afc0

或者在這裏:

https://www.google.it/maps/place/84020+SA/@40.605482,15.1783416,10.32z/data=!4m2!3m1!1s0x13396999456508e7:0x1c09e123127ecbc0

但我不能找到一個辦法讓他們在我的申請,在他們的網站https://developers.google.com/maps/documentation/沒有找到這樣的指南。另外,在我連接答案的SO問題中,Google表示Google不提供這些數據,但截至2015年,他們可能已經改變了一些東西?

現在,爲什麼的特徵沒有一個我找到適合我的需要:

  • 他們所有的地址只有美國的郵政編碼;
  • 我發現的當地意大利網站(mapit.openpolis.it)不會返回多邊形區域的座標,而只是一對指向郵政編碼中心的latlng,也不會返回任何一些郵政編碼(CAP)。

我能做什麼?有沒有辦法與Google Maps API團隊的負責人聯繫,並詢問他在這種情況下應該怎麼做? (我非常認真,所以不要嘲笑我......)。

感謝您的關注。

+1

此功能已被[請求](https://code.google.com/p/gmaps-api-issues/issues/detail?id=109),您必須等到它實施或找到一個第三方解決方案 –

+0

downvote似乎有點過分,我沒有以錯誤的方式闡述我的答案,並解釋了我需要以一個非常明確的方式處理的具體情況,還寫了爲什麼我發現(在SO和其他網站/資源)沒有爲我工作... – tonix

+0

@ Dr.Molle感謝您的鏈接,我也寫了評論。希望執行7年前所要求的功能不會太長時間... – tonix

回答

0

您可以檢查出從開放街道地圖郵政邊界。

+0

已經完成。他們沒有返回我國(意大利)的郵政編碼邊界。 – tonix

相關問題