تنظيم صفحاتك في مجموعات
يمكنك حفظ المحتوى وتصنيفه حسب إعداداتك المفضّلة.
استخدم محددات المواقع للفت انتباه المستخدم إلى موقع على الخريطة. يوضح هذا الدليل كيفية استخدام
وتخصيص العلامات في الخرائط الثلاثية الأبعاد. يمكنك التحكم في شكل وحجم ولون العلامات، بالإضافة إلى الارتفاع الذي تظهر عنده.
استخدم محددات المواقع لعرض المواقع على الخرائط. يوضح المثال أعلاه علامة أساسية فردية
بدون تطبيق أي تخصيص.
تخصيص اللون والقياس وصورة الرمز
يمكنك تخصيص خلفية العلامة التلقائية والرسم البياني ولون الحد وحجمها.
استبدِل رمز العلامة التلقائي بمورد SVG مخصّص.
ضبط ارتفاع العلامة
يمكنك تعيين ارتفاع العلامة بإنبثق العلامة وتعيين الارتفاع.
جعل العلامات تستجيب لأحداث النقر ولوحة المفاتيح
يمكنك إنشاء علامة تستجيب للنقرات وأحداث لوحة المفاتيح عن طريق إضافة أداة استماع إلى أحداث click.
functioninitMap(){constmap=newMap3DElement({center:{lat:37.4690,lng:-122.1074,altitude:0},tilt:67.5,range:45000,mode:MapMode.HYBRID});constinteractiveMarker=newgoogle.maps.marker.Marker3DInteractiveElement({map,position:{lat:37.4239163,lng:-122.0947209},});interactiveMarker.addEventListener('gmp-click',(event)=>{// Handle the click event.// ...});}
ضبط سلوك تصادم العلامات
حدد كيف يجب أن تتصرف العلامة عندما تتضارب مع علامة أو تسمية
أخرى للخريطة.
تاريخ التعديل الأخير: 2025-04-29 (حسب التوقيت العالمي المتفَّق عليه)
[null,null,["تاريخ التعديل الأخير: 2025-04-29 (حسب التوقيت العالمي المتفَّق عليه)"],[],[],null,["\u003cbr /\u003e\n\n| This product or feature is in Preview (pre-GA). Pre-GA products and features might have limited support, and changes to pre-GA products and features might not be compatible with other pre-GA versions. Pre-GA Offerings are covered by the [Google\n| Maps Platform Service Specific Terms](https://cloud.google.com/maps-platform/terms/maps-service-terms). For more information, see the [launch stage\n| descriptions](/maps/launch-stages).\n\n\u003cbr /\u003e\n\nUse markers to draw a user's attention to a location on a map. This guide\ndemonstrates how to use and customize markers in 3D maps. You can control the\nshape, size, and color of markers, in addition to the altitude at which they\nappear.\n\nUse markers to show locations on maps. The example above shows a basic, single\nmarker with no customization applied.\n\nCustomize color, scale and icon image\n\nCustomize the default marker's background, glyph, border color, and size.\n\nReplace the default marker icon with a custom SVG resource.\n\nSet marker altitude\n\nYou can set marker altitude by extruding the marker and setting the altitude.\n\nMake markers respond to click and keyboard events\n\nMake a marker respond to clicks and keyboard events by adding a `click` event\nlistener. \n\n function initMap() {\n const map = new Map3DElement({\n center: { lat: 37.4690, lng: -122.1074, altitude: 0 },\n tilt: 67.5,\n range: 45000,\n mode: MapMode.HYBRID\n });\n\n const interactiveMarker = new google.maps.marker.Marker3DInteractiveElement({\n map,\n position: {lat: 37.4239163, lng: -122.0947209},\n });\n\n interactiveMarker.addEventListener('gmp-click', (event) =\u003e {\n // Handle the click event.\n // ...\n });\n }\n\nSet marker collision behavior\n\nSpecify how a marker should behave when it collides with another marker or map\nlabel. \n\n const marker = new Marker3DElement({\n position: {lat, lng},\n collisionBehavior: google.maps.CollisionBehavior.REQUIRED\n });\n\nNext step\n\n- [Add a marker](/maps/documentation/javascript/3d/marker-add)"]]