أداة ترميز Polyline تفاعلية
تنظيم صفحاتك في مجموعات
يمكنك حفظ المحتوى وتصنيفه حسب إعداداتك المفضّلة.
يمكن أن تنشئ "خرائط Google" خطًا متعدد الأضلاع بسيطًا من إحداثيات خطوط الطول والعرض.
يمكنك الاطّلاع على مزيد من المعلومات حول
ترميز الخطوط المتعددة
والخطوط المتعددة البسيطة
والخطوط المتعددة المعقّدة.
باستخدام هذه الأداة، يمكنك إنشاء عمليات ترميز لخطوط متعدّدة الأضلاع بشكل تفاعلي على خريطة أو عن طريق إدخال إحداثيات.
يمكنك أيضًا فك ترميز الخطوط المتعددة الأضلاع إلى إحداثيات
باستخدام هذه الأداة بشكل عكسي.
ومع ذلك، إذا كان لديك خط متعدد الأضلاع مشفّر حالي أو قائمة إحداثيات بتنسيق GeoJSON linestring وأردت عرض الخط المتعدد الأضلاع على خريطة، استخدِم أداة فك تشفير الخطوط المتعددة الأضلاع التفاعلية.
إنشاء خط متعدد الأضلاع بشكل تفاعلي على الخريطة
- أدخِل عنوانًا أو رمزًا بريديًا أو موقعًا جغرافيًا أو مَعلَمًا لتوسيط الخريطة، ثم انقر على بحث.
- انقر على الخريطة لوضع علامة تمثّل الموقع الجغرافي لبداية الخط المتعدد الأضلاع.
- تظهر إحداثيات العلامة في المربّعين خط العرض وخط الطول.
- انقر على الزر إضافة موقع جغرافي.
يؤدي ذلك إلى إضافة الإحداثيات إلى قائمة المواقع الجغرافية
وإنشاء ترميز في مربّع الخط المتعدد المرمّز.
- واصِل وضع العلامات على الخريطة لإضافة جميع المواقع الجغرافية على الخط المتعدد الأضلاع
إلى قائمة المواقع الجغرافية والخط المتعدد الأضلاع المرمّز.
تعديل الإحداثيات
- لحذف موقع جغرافي، حدِّده في قائمة المواقع الجغرافية واضغط على
حذف الموقع الجغرافي المحدّد.
- لحذف جميع المواقع الجغرافية والبدء من جديد، انقر على حذف كل المواقع الجغرافية.
- لا يمكنك تعديل المواقع الجغرافية. لتعديل موقع جغرافي، عليك حذفه وإعادة إضافته.
إذا لم يكن الموقع الجغرافي في نهاية القائمة، احذِف الموقع الجغرافي وجميع المواقع الجغرافية التي تليه.
إنشاء خط متعدد الأضلاع من خلال إدخال الإحداثيات
- إذا كانت لديك قائمة حالية بالإحداثيات، يمكنك إدخال خطوط الطول والعرض يدويًا في المربّعات الخاصة بها بدلاً من وضع علامات.
تحويل خطوط متعدّدة الأضلاع إلى إحداثيات
- أدخِل الخطوط المتعددة في مربّع الخطوط المتعددة المشفرة.
- إذا كان خطك المتعدد الأضلاع يحتوي على أحرف تم تخطّيها، انقر على مربّع الاختيار لإلغاء تخطّيها.
- انقر على فك ترميز خطوط متعددة الأضلاع.
تظهر الإحداثيات في قائمة المواقع الجغرافية، ويتم رسم الخط على الخريطة.
تستخدم هذه الأداة Maps JavaScript API. على وجه التحديد،
تتم معالجة ترميز المسارات وفك ترميزها من خلال الطريقتَين الثابتتَين encodePath()
وdecodePath()
في مساحة الاسم google.maps.geometry.encoding
.
راجِع تنسيق خوارزمية الخطوط المتعددة المرمّزة للحصول على معلومات حول مخطّط الترميز.
إنّ محتوى هذه الصفحة مرخّص بموجب ترخيص Creative Commons Attribution 4.0 ما لم يُنصّ على خلاف ذلك، ونماذج الرموز مرخّصة بموجب ترخيص Apache 2.0. للاطّلاع على التفاصيل، يُرجى مراجعة سياسات موقع Google Developers. إنّ Java هي علامة تجارية مسجَّلة لشركة Oracle و/أو شركائها التابعين.
تاريخ التعديل الأخير: 2025-08-29 (حسب التوقيت العالمي المتفَّق عليه)
[null,null,["تاريخ التعديل الأخير: 2025-08-29 (حسب التوقيت العالمي المتفَّق عليه)"],[],[],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."]]