Значки мест обозначают различные типы мест (например, кофейни, библиотеки и музеи). Вы можете запросить URL-адреса для значков в формате PNG или SVG, а также соответствующий цвет фона значка с помощью запросов Find Place, Place Details, Nearby Search и Text Search. Значки можно использовать в строке.
Каждый значок определяется двумя полями ответа:
Базовый URI значка содержит базовый URL для нецветного значка, за исключением расширения типа файла. Для запроса значка необходимо добавить .svg или .png к URI.
Цвет фона значка содержит шестнадцатеричный код цвета по умолчанию для категории места.
Пример
В следующих примерах показано, как запросить URI значка и цвет фона для API Places (новый) и API Places (устаревший). Обратите внимание, что запрос и ответы различаются для двух версий API.
API мест (новый)
В следующем примере используется текстовый поиск (новый) для возврата отображаемого названия места, а также полей ответа iconMaskBaseUri и iconBackgroundColor :
{"places":[{"iconMaskBaseUri":"https://maps.gstatic.com/mapfiles/place_api/icons/v2/cafe_pinlet","iconBackgroundColor":"#FF9E67","displayName":{"text":"SKÖG Haus Coffee & Tea","languageCode":"en"}}]}
API мест (устаревший)
В следующем примере показан запрос Find Place (Legacy) , который включает поля icon_mask_base_uri и icon_background_color :
Чтобы отобразить значок, добавьте расширение типа файла (.png или .svg), которое вы хотите, к возвращаемому URI значка и объедините значок с возвращаемым цветом фона. Например, чтобы отобразить значок .svg на веб-странице:
В следующих таблицах показаны все доступные значки мест по категориям. По умолчанию они отображаются с черным глифом. Цвет фона значка определяется категорией места.
Категория места: Еда и напитки (цвет фона значка #FF9E67)
[[["Прост для понимания","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-08-22 UTC."],[[["\u003cp\u003ePlace icons, available in PNG or SVG formats, visually represent various place types like restaurants and libraries, and can be requested using Find Place, Place Details, Nearby Search, and Text Search requests.\u003c/p\u003e\n"],["\u003cp\u003eEach icon is identified by an icon base URI (requiring \u003ccode\u003e.svg\u003c/code\u003e or \u003ccode\u003e.png\u003c/code\u003e appended for the full URL) and an icon background color, represented by a HEX color code.\u003c/p\u003e\n"],["\u003cp\u003eWhile the older Places API uses \u003ccode\u003eicon\u003c/code\u003e, \u003ccode\u003eicon_mask_base_uri\u003c/code\u003e, and \u003ccode\u003eicon_background_color\u003c/code\u003e fields, the new Places API uses \u003ccode\u003eiconMaskBaseUri\u003c/code\u003e and \u003ccode\u003eiconBackgroundColor\u003c/code\u003e.\u003c/p\u003e\n"],["\u003cp\u003eTo display an icon, combine the icon base URI with the desired file type extension and apply the icon background color as the background of the image element.\u003c/p\u003e\n"],["\u003cp\u003ePlace icons are categorized, such as Food and drink or Tourist, with each category having a specific background color.\u003c/p\u003e\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**European Economic Area (EEA) developers** If your billing address is in the European Economic Area, effective on 8 July 2025, the [Google Maps Platform EEA Terms of Service](https://cloud.google.com/terms/maps-platform/eea) will apply to your use of the Services. Functionality varies by region. [Learn more](/maps/comms/eea/faq).\n\nIntroduction\n------------\n\nPlace icons indicate the various types of places (for example coffee shops,\nlibraries, and museums). You can request URLs for icons in PNG or SVG format,\nas well as the corresponding icon background color, with Find Place,\nPlace Details, Nearby Search, and Text Search requests. Icons can be used inline.\n\nEach icon is defined by two response fields:\n\n- The **icon base URI** contains the base URL for a non-colored icon, minus the file type extension. You must append `.svg` or `.png` to the URI to request the icon.\n- The **icon background color** contains the default HEX color code for the place's category.\n\n| Icon URLs may change, so be sure to always use **icon base URI** to look up the URL for an icon. Places API (Legacy) supports the `icon` response field. Don't use `icon` field but instead use `icon_background_color` and `icon_mask_base_uri` with Places API (Legacy).\n\nExample\n-------\n\nThe following examples show how to request an icon URI and background color for\nPlaces API (New) and Places API (Legacy). Notice that the request and responses are different\nfor the two versions of the API. \n\n### Places API (New)\n\nThe following example uses\n[Text Search (New)](/maps/documentation/places/web-service/text-search)\nto return the display name of a place as well as the `iconMaskBaseUri` and\n`iconBackgroundColor` response fields: \n\n```curl\ncurl -X POST -d '{\n \"textQuery\" : \"skog haus\",\n \"maxResultCount\" : 1\n}' \\\n-H 'Content-Type: application/json' -H 'X-Goog-Api-Key: API_KEY' \\\n-H 'X-Goog-FieldMask: places.displayName,places.iconMaskBaseUri,places.iconBackgroundColor' \\\n'https://places.googleapis.com/v1/places:searchText'\n```\n\nThe response is in the form: \n\n```json\n{\n \"places\": [\n {\n \"iconMaskBaseUri\": \"https://maps.gstatic.com/mapfiles/place_api/icons/v2/cafe_pinlet\",\n \"iconBackgroundColor\": \"#FF9E67\",\n \"displayName\": {\n \"text\": \"SKÖG Haus Coffee & Tea\",\n \"languageCode\": \"en\"\n }\n }\n ]\n}\n```\n\n### Places API (Legacy)\n\nThe following example shows a\n[Find Place (Legacy)](/maps/documentation/places/web-service/search#FindPlaceRequests) request\nwhich includes the `icon_mask_base_uri` and `icon_background_color`\nfields: \n\n```carbon\n https://maps.googleapis.com/maps/api/place/findplacefromtext/json?input=skog%20haus&inputtype=textquery&fields=name,icon_mask_base_uri,icon_background_color&key=\u003cvar translate=\"no\"\u003eAPI_KEY\u003c/var\u003e\n```\n\nThe following example shows how the `icon_mask_base_uri` and\n`icon_background_color` fields appear in a response from a Find Place (Legacy)\nrequest. \n\n### JSON\n\n```json\n {\n \"candidates\" : [\n {\n \"icon_background_color\" : \"#FF9E67\",\n \"icon_mask_base_uri\" : \"https://maps.gstatic.com/mapfiles/place_api/icons/v2/cafe_pinlet\",\n \"name\" : \"SKÖG Haus Coffee\",\n }\n ],\n \"status\" : \"OK\"\n }\n \n```\n\n### XML\n\n```xml\n \u003cFindPlaceFromTextResponse\u003e\n \u003ccandidates\u003e\n \u003cname\u003eSKÖG Haus Coffee\u003c/name\u003e\n \u003cicon_background_color\u003e#FF9E67\u003c/icon_background_color\u003e\n \u003cicon_mask_base_uri\u003ehttps://maps.gstatic.com/mapfiles/place_api/icons/v2/cafe_pinlet\u003c/icon_mask_base_uri\u003e\n \u003c/candidates\u003e\n \u003cstatus\u003eOK\u003c/status\u003e\n \u003c/FindPlaceFromTextResponse\u003e\n \n```\n\nTo display an icon, append the file type extension (.png or .svg) you want to the returned icon\nURI, and combine the icon with the returned background color. For example, to display the .svg icon\non a web page: \n\n```html\n\u003cstyle\u003e\n .icons-food-drink {\n background-color: #ff9e67;\n width: 88px;\n height: 88px;\n padding: 5px;\n }\n\u003c/style\u003e\n\n\u003cimg src=\"https://maps.gstatic.com/mapfiles/place_api/icons/v2/cafe_pinlet.svg\" alt=\"Cafe\" class=\"icons-food-drink\"/\u003e\n```\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 |"]]