تشير رموز الأماكن إلى الأنواع المختلفة من الأماكن (مثل المقاهي
والمكتبات والمتاحف). يمكنك طلب عناوين URL للرموز بتنسيق PNG، بالإضافة إلى
لون خلفية الرمز المقابل، وذلك من خلال requests
الموقع الجغرافي الحالي
وتفاصيل الموقع الجغرافي (جديد)
.
لطلب صورة رمز ولون خلفية لمكان ما، يجب تضمين
الحقول التالية في طلبك:
Place.Field.ICON_MASK_URL
Place.Field.ICON_BACKGROUND_COLOR
توضِّح الأمثلة التالية استخدام صورة الرمز ولون الخلفية
من طلب "المكان الحالي" أو "تفاصيل المكان":
Kotlin
// Set the image view's background color to match the place's icon background colorimageView.setBackgroundColor(place.iconBackgroundColor)// Fetch the icon using Glide and set the result in the image viewGlide.with(this).load(place.iconUrl).into(imageView)
Java
// Set the image view's background color to match the place's icon background colorimageView.setBackgroundColor(place.getIconBackgroundColor());// Fetch the icon using Glide and set the result in the image viewGlide.with(this).load(place.getIconUrl()).into(imageView);
يستخدم هذا المثال الخيار Glide
مكتبة تحميل الصور، إلا أنه يمكنك استخدام مكتبة تحميل الصور التي تختارها.
الحقول
يحتوي كل رمز مكان على الحقول التالية:
تعرض الدالة ICON_MASK_URL عنوان URL الأساسي لرمز PNG غير ملوّن.
تعرض ICON_BACKGROUND_COLOR رمز اللون التلقائي
فئة المكان.
تقديم طلبات ألوان الرموز والخلفية
تعرض الجداول التالية جميع رموز الأماكن المتاحة حسب الفئة. من
هذه الشاشات افتراضيًا بحرف رسومي أسود. يعتمد لون خلفية الرمز
على فئة المكان.
فئة المكان: الطعام والشراب (لون خلفية الرمز #FF9E67)
حانة، نادي ليلي
مقهى
مطعم أو مخبز
فئة المكان: البيع بالتجزئة (لون خلفية الرمز #4B96F3)
كتب، ملابس، أجهزة إلكترونية، مجوهرات، أحذية، مركز تسوّق/مركز تسوّق
متجر صغير
متجر بقالة أو سوبر ماركت
صيدلية
فئة المكان: الخدمات (لون خلفية الرمز #909CE1)
ماكينة الصراف الآلي
المصرف
محطات وقود
أماكن الإقامة
مكتب بريد
فئة المكان: ترفيه (لون خلفية الرمز #13B5C7)
حوض أسماك، سياحي
الغولف
موقع تاريخي
فيلم
متحف
مسرحية
فئة المكان: وسائل النقل (لون خلفية الرمز #10BDFF)
مطار
الحافلة ومشاركة الرحلات وسيارات الأجرة
القطار/السكك الحديدية
فئة المكان: بلدية/عامة/دينية (لون خلفية الرمز #7B9EB0)
مقبرة
مبنى مدني
المكتبة
نصب تذكاري
موقف سيارات
مدرسة (ابتدائية، ثانوية، جامعة)
العبادة (مسيحية)
عبادة (هندوسية)
العبادة (الإسلام)
العبادة (اليانية)
العبادة (اليهود)
العبادة (السيخية)
نشاط تجاري عام
فئة المكان: في الهواء الطلق (لون خلفية الرمز #4DB546)
تاريخ التعديل الأخير: 2025-09-05 (حسب التوقيت العالمي المتفَّق عليه)
[[["يسهُل فهم المحتوى.","easyToUnderstand","thumb-up"],["ساعَدني المحتوى في حلّ مشكلتي.","solvedMyProblem","thumb-up"],["غير ذلك","otherUp","thumb-up"]],[["لا يحتوي على المعلومات التي أحتاج إليها.","missingTheInformationINeed","thumb-down"],["الخطوات معقدة للغاية / كثيرة جدًا.","tooComplicatedTooManySteps","thumb-down"],["المحتوى قديم.","outOfDate","thumb-down"],["ثمة مشكلة في الترجمة.","translationIssue","thumb-down"],["مشكلة في العيّنات / التعليمات البرمجية","samplesCodeIssue","thumb-down"],["غير ذلك","otherDown","thumb-down"]],["تاريخ التعديل الأخير: 2025-09-05 (حسب التوقيت العالمي المتفَّق عليه)"],[[["\u003cp\u003ePlace icons, available in PNG format, represent various place types like restaurants and libraries, accessible through Current Place and Place Details requests.\u003c/p\u003e\n"],["\u003cp\u003eYou can retrieve the icon URL using \u003ccode\u003ePlace.Field.ICON_MASK_URL\u003c/code\u003e and the background color using \u003ccode\u003ePlace.Field.ICON_BACKGROUND_COLOR\u003c/code\u003e.\u003c/p\u003e\n"],["\u003cp\u003eThe icon URL is a base URL for a non-colored PNG that is overlaid on a background color representing the place's category, like #FF9E67 for food and drink.\u003c/p\u003e\n"],["\u003cp\u003eCode examples are provided in Kotlin and Java to demonstrate fetching and displaying the icon and background color using an image loading library like Glide.\u003c/p\u003e\n"],["\u003cp\u003eA comprehensive table showcases available place icons categorized by type, along with their corresponding background colors.\u003c/p\u003e\n"]]],["Place icons, indicating different types of locations, can be accessed via URLs in PNG format along with their background colors. Requests for icons and colors require the `ICON_MASK_URL` and `ICON_BACKGROUND_COLOR` fields. The icon URL, obtained through `Place.Field.ICON_MASK_URL`, should be consistently referenced due to potential changes. `ICON_BACKGROUND_COLOR` returns the category's default color. The document then details various place categories and their associated icons and background colors. For example food and drink has the background color #FF9E67.\n"],null,["# Place Icons\n\nSelect platform: [Android](/maps/documentation/places/android-sdk/icons \"View this page for the Android platform docs.\") [iOS](/maps/documentation/places/ios-sdk/icons \"View this page for the iOS platform docs.\") [JavaScript](/maps/documentation/javascript/place-icons \"View this page for the JavaScript platform docs.\") [Web Service](/maps/documentation/places/web-service/icons \"View this page for the Web Service platform docs.\")\n\nPlace icons indicate the various types of places (for example coffee shops,\nlibraries, and museums). You can request URLs for icons in PNG format, as well\nas the corresponding icon background color, with\n[Current Place](/maps/documentation/places/android-sdk/current-place),\nand [Place Details (New)](/maps/documentation/places/android-sdk/details-place)\nrequests.\n\nTo request an icon image and background color for a place, include the\nfollowing fields in your request:\n\n- `Place.Field.ICON_MASK_URL`\n- `Place.Field.ICON_BACKGROUND_COLOR`\n\nThe following examples demonstrate using the icon image and background color\nfrom a Current Place or Place Details request: \n\n### Kotlin\n\n```kotlin\n // Set the image view's background color to match the place's icon background color\n imageView.setBackgroundColor(place.iconBackgroundColor)\n\n // Fetch the icon using Glide and set the result in the image view\n Glide.with(this)\n .load(place.iconUrl)\n .into(imageView)\n\n \n```\n\n### Java\n\n```java\n // Set the image view's background color to match the place's icon background color\n imageView.setBackgroundColor(place.getIconBackgroundColor());\n\n // Fetch the icon using Glide and set the result in the image view\n Glide.with(this)\n .load(place.getIconUrl())\n .into(imageView);\n\n \n```\nThis example uses the [Glide](https://github.com/bumptech/glide) image loading library, but you can use the image loading library of your choice. Icon URLs may change, so be sure to always use `Place.Field.ICON_MASK_URL` to look up the URL for an icon.\n\nFields\n------\n\nEach Place icon contains these fields:\n\n- `ICON_MASK_URL` returns the base URL for a non-colored PNG icon.\n- `ICON_BACKGROUND_COLOR` returns the default color code for the place's category.\n\nPlace icon and background color requests\n----------------------------------------\n\nThe following tables show all of the available place icons by category. By\ndefault these display with a black glyph. The icon background color\nis dictated by the place's category.\n\n| **Place category: Food and drink** (icon background color #FF9E67) ||||\n|--------------------------------------------------------------------|-----------------------------------------|----------------------|------------------|\n| Bar, Night club | Cafe | Restaurant, Bakery |\n| Books, Clothing, Electronics, Jewelry, Shoes, Shopping center/Mall | Convenience store | Grocery, Supermarket | Pharmacy |\n| ATM | Bank | Gas | Lodging |\n| Post office |\n| Aquarium, Tourist | Golf | Historic | Movie |\n| Museum | Theater |\n| Airport | Bus, rideshare, taxi | Train/Rail |\n| Cemetery | Civic building | Library | Monument |\n| Parking | School (primary, secondary, university) | Worship (Christian) |\n| Worship (Hindu) | Worship (Islam) | Worship (Jain) | Worship (Jewish) |\n| Worship (Sikh) | Generic business |\n| Boating | Camping | Park | Stadium |\n| Zoo |\n| Hospital | Police |"]]