المستندات › المنتجات
أنماط الخريطة
احفظ مظهر علامتك التجارية لخريطة وازلي (الألوان، المباني، أرقام البيوت، الأماكن الظاهرة) وحمّله باسمه في مواقعك وتطبيقاتك.
ما ترسله
تُحفظ الأنماط بمفتاح خادم يشمل منتج أنماط الخريطة، ويبقى على خادمك. يحمل كل حساب حتى 20 نمطًا. الاسم من 2 إلى 40 حرفًا من a-z و0-9 و"-" (لا يبدأ بها ولا ينتهي).
| الطلب | ما هو |
|---|---|
GET /styles | كل أنماط الحساب. |
GET /styles/{name} | نمط واحد. |
PUT /styles/{name} | أنشئ النمط أو استبدله. المتن JSON، بحد أقصى 4 KB. |
DELETE /styles/{name} | احذف النمط. |
| الحقل | ما هو |
|---|---|
base | "light" أو "dark" (مطلوب). |
colors | ألوان مثل #1a73e8 لأيٍّ من: land, water, parks, buildings, streets, mainRoads, highways, roadEdges, labels, labelOutline. |
show | true أو false لكلٍّ من places وbuildings وhouseNumbers. |
hidePlaces | قائمة بأنواع الأماكن التي تُخفى من الخريطة (أدناه). |
أنواع الأماكن: restaurant, fast_food, cafe, bakery, ice_cream, supermarket, convenience, place_of_worship, school, kindergarten, college, university, library, hospital, clinic, doctors, pharmacy, fuel, car_wash, car_repair, charging_station, mall, jewelry, hairdresser, beauty, books, clothes, electronics, park, garden, golf_course, fitness_centre, sports_centre, stadium, beach, forest, marina, peak, hotel, attraction, theme_park, water_park, zoo, museum, theatre, cinema, artwork, animal, bank, post_office, townhall, aerodrome, station, bus_stop, ferry_terminal, police, fire_station, courthouse, bus_station, government, diplomatic, monument, memorial, ruins, archaeological_site, castle, city_gate.
ما يرجع
GET /styles يجيب { styles: [...] }؛ وGET وPUT يجيبان { style }؛ وDELETE يجيب { deleted: true }. للنمط اسمه وbase وcolors وshow وhidePlaces وstatus ("active"، أو "off" إن أوقفه فريق وازلي فترسم الخرائط مظهره الأساسي) وupdatedAt. الاسم غير الموجود يجيب 404 not_found.
{
"style": {
"name": "my-brand",
"base": "light",
"colors": { "water": "#7cc4e8", "highways": "#e85d3a" },
"show": { "houseNumbers": false },
"hidePlaces": ["bus_stop", "car_wash"],
"status": "active",
"updatedAt": "2026-11-17T20:42:45.011Z"
}
}مثال
احفظ نمطًا من خادمك:
curl -X PUT "https://map.wazli.com/api/maps/v1/styles/my-brand" \
-H "X-Wazli-Key: YOUR_STYLES_KEY" \
-H "Content-Type: application/json" \
-d '{"base":"light","colors":{"water":"#7cc4e8","highways":"#e85d3a"},"show":{"houseNumbers":false},"hidePlaces":["bus_stop","car_wash"]}'ثم يحمّله أي مفتاح موقع في الحساب نفسه باسمه:
WazliMaps.createMap("map", { key: "YOUR_WEBSITE_KEY", center: [-81.379, 28.538], style: "my-brand" });اعرض أنماطك، أو احذف واحدًا:
curl "https://map.wazli.com/api/maps/v1/styles" \
-H "X-Wazli-Key: YOUR_STYLES_KEY"curl -X DELETE "https://map.wazli.com/api/maps/v1/styles/my-brand" \
-H "X-Wazli-Key: YOUR_STYLES_KEY"