대화형 폴리라인 인코더 유틸리티
컬렉션을 사용해 정리하기
내 환경설정을 기준으로 콘텐츠를 저장하고 분류하세요.
Google 지도에서는 두 개 이상의 위도/경도 좌표에서 간단한 다중선을 생성할 수 있습니다.
다중선 인코딩, 단순 다중선, 복잡한 다중선에 대해 자세히 알아보세요.
이 유틸리티를 사용하면 지도에서 대화형으로 또는 좌표를 입력하여 폴리라인 인코딩을 생성할 수 있습니다.
이 도구를 역으로 사용하여 폴리라인을 좌표로 디코딩할 수도 있습니다.
하지만 기존 인코딩된 다중선이나 좌표 목록이 GeoJSON 유도선으로 있고 지도에서 다중선을 보려면 대화형 폴리라인 디코더 유틸리티를 사용하세요.
지도에서 대화형으로 폴리라인 만들기
- 주소, 우편번호, 위치 또는 명소를 입력하여 지도를 가운데로 이동하고 검색을 클릭합니다.
- 지도를 클릭하여 다중선의 시작 위치를 나타내는 마커를 배치합니다.
- 마커의 좌표가 위도 및 경도 상자에 표시됩니다.
- 위치 추가 버튼을 클릭합니다.
이렇게 하면 좌표가 위치 목록에 추가되고 인코딩된 폴리라인 상자에 인코딩이 생성됩니다.
- 지도에 마커를 계속 배치하여 다중선의 모든 위치를 위치 목록과 인코딩된 다중선에 추가합니다.
좌표 수정
- 위치를 삭제하려면 위치 목록에서 위치를 선택하고 선택한 위치 삭제를 누릅니다.
- 모든 위치를 삭제하고 다시 시작하려면 모든 위치 삭제를 클릭합니다.
- 위치를 수정할 수 없습니다. 위치를 수정하려면 삭제한 후 다시 추가하세요.
위치가 목록 끝에 있지 않으면 위치와 그 뒤에 있는 모든 위치를 삭제합니다.
좌표를 입력하여 폴리라인 만들기
- 기존 좌표 목록이 있는 경우 마커를 배치하는 대신 각 상자에 위도와 경도를 수동으로 입력할 수 있습니다.
다중선을 좌표로 디코딩
- 인코딩된 폴리라인 상자에 폴리라인을 입력합니다.
- 폴리라인에 이스케이프된 문자가 포함된 경우 체크박스를 클릭하여 이스케이프를 해제합니다.
- 다중선 디코딩을 클릭합니다.
좌표가 위치 목록에 표시되고 지도로 선이 그려집니다.
이 유틸리티는 Maps JavaScript API를 사용합니다. 특히 경로의 인코딩 및 디코딩은 google.maps.geometry.encoding
네임스페이스의 정적 메서드 encodePath()
및 decodePath()
에 의해 처리됩니다.
인코딩 방식에 관한 자세한 내용은 인코딩된 폴리라인 알고리즘 형식을 참고하세요.
달리 명시되지 않는 한 이 페이지의 콘텐츠에는 Creative Commons Attribution 4.0 라이선스에 따라 라이선스가 부여되며, 코드 샘플에는 Apache 2.0 라이선스에 따라 라이선스가 부여됩니다. 자세한 내용은 Google Developers 사이트 정책을 참조하세요. 자바는 Oracle 및/또는 Oracle 계열사의 등록 상표입니다.
최종 업데이트: 2025-08-29(UTC)
[null,null,["최종 업데이트: 2025-08-29(UTC)"],[],[],null,["# Interactive Polyline Encoder Utility\n\nGoogle Maps can generate a simple polyline from two or more latitude/longitude coordinates.\nLearn more about\n[polyline encoding](/maps/documentation/utilities/polylinealgorithm),\n[simple polylines](/maps/documentation/javascript/examples/polyline-simple),\nand\n[complex polylines](/maps/documentation/javascript/examples/polyline-complex).\n\nWith this utility, you can generate polyline encodings\ninteractively on a map or by entering coordinates.\nYou can also decode polylines into coordinates\nby using this tool in reverse.\n\nHowever, if you have an existing encoded polyline or a list of coordinates as a\n[GeoJSON linestring](https://geojson.org/)\nand want to view the polyline on a map, use the\n[Interactive polyline decoder utility](/maps/documentation/routes/polylinedecoder).\n\n**Create a polyline interactively on the map**\n\n1. Enter an address, zip code, location, or landmark to center the map and click **Search**.\n2. Click the map to place a marker that represents the start location of your polyline.\n3. The coordinates of your marker show in the **Latitude** and **Longitude** boxes.\n4. Click the **Add Location** button. This adds the coordinates to the **Location list** and generates an encoding in the **Encoded Polyline** box.\n5. Continue to place markers on the map to add all locations on your polyline to the **Location list** and the **Encoded polyline**.\n\n**Editing coordinates**\n\n- To delete a location, select it in the **Location list** and press **Delete Selected Location**.\n- To delete all locations and start over, click **Delete All Locations**.\n- You cannot edit locations. To edit a location, delete and re-add it. If the location is not at the end of your list, delete the location and all the ones following.\n\n**Create a polyline by entering coordinates**\n\n- If you have an existing list of coordinates, instead of placing markers, you can manually enter the latitudes and longitudes in their respective boxes.\n\n**Decode a polyline into coordinates**\n\n1. Enter your polyline into the **Encoded Polyline** box.\n2. If your polyline contains escaped characters, click the checkbox to unescape them.\n3. Click **Decode Polyline** . The coordinates show in the **Location list**, and the line is drawn on the map.\n\n\u003cbr /\u003e\n\n|--------------------------------------------|----------------------------------------------------------------------------------------------------------------------|\n| Input an address to center the map: Search | |------------|---| | Latitude: | | | Longitude: | | | | | || \u003cbr /\u003e **Locations list** |\n| |-------------------|-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------| | | **Warning**: Special characters in the encoded polylines returned in JSON responses are escaped. To use these polylines here you must unescape them. | | Encoded Polyline: | |---------------------------------------------------------------------------------| | | | Unescape special characters in the encoded polylines returned in JSON responses | | | || ||\n\nThis utility uses the Maps JavaScript API. Specifically,\nencoding and decoding of paths are handled by the static methods `encodePath()`\nand `decodePath()` in the `google.maps.geometry.encoding` namespace.\nSee the [Encoded Polyline Algorithm\nFormat](/maps/documentation/utilities/polylinealgorithm) for information about the encoding scheme."]]