简体   繁体   中英

Migrating from Google Maps JavaScript API V2 to V3, encoded polygons?

The application I'm migrating takes heavy advantage of encoded polygons, for example, for one polygon, the coordinates are in the format:

Encoded coords: ih}rJ|ixk^lLuJhM_i@fG?zGnKlG?|E_G|FwSaDf]yGhhBaBv}BcDvBwNwHsM~D}EWuJaH{Nf_@{Da^sTofAF_LjDePtH}KFmZ`E?fQad@jEsC

Level code: PEGEDGDICEHEEDEGJDDHDEFEDP

However, I've searched the net and can't seem to find a definitive answer if V3 accepts these encoded polygons? These are the only coordinates I have... I don't have the lat/lng coordinates, so am I screwed? Can the application be migrated to V3?

The v3 API supports decoding the encoded coordinates.

https://developers.google.com/maps/documentation/javascript/reference#encoding

Paste your encoded polygon string into here:

http://www.geocodezip.com/blitz-gmap-editor/test5.html

click "generate polygon from encoded"

discussion on the google maps api v2 group

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM