Aşağıdakilere yerleştirilmiş bir JSON stil bildirimleri aracılığıyla özelleştirilmiş stil uygulayabilirsiniz:
Varsayılan harita.
Kullanıcının tek bir harita çerçevesinde geçiş yapabileceği harita türleri.
Özelliklere stil belirtme
Bir haritadaki farklı özelliklere ve öğelere stil uygulamak için haritanın nasıl şekillendirilmesi gerektiğini tanımlayan bir MapTypeStyle nesne dizisi oluşturun.
Dizi aşağıdaki biçimde olur:
varstylesArray=[{featureType:'',elementType:'',stylers:[{color:''},{visibility:''},// Add any stylers you need.]},{featureType:'',// Add the stylers you need.}]
featureType, elementType ve stylers için kullanılabilen tüm değerlerin listesini görmek istiyorsanız JSON stil referansına bakın.
Aşağıda, koyu arka plan üzerinde açık renkli metin ve simgeler kullanılarak (ör. koyu mod) oluşturulmuş varsayılan bir harita örneği gösterilmektedir. Kod örneğini görmek için Stil Verilmiş Haritalar - Gece Modu kod örneği sayfasına gidin.
Varsayılan haritanın stillerini değiştirmek için styles nesnesindeki haritanın MapOptions özelliğini stil dizinize ayarlayın:
Haritanız oluşturuluyor.
Alternatif olarak, Map.setOptions yöntemini çağırırken de bu işlemi yapabilirsiniz.
Etiketlerde ve yollarda yapılan değişiklikler; arazi, uydu, karma ve varsayılan yol haritası türleri dahil olmak üzere tüm harita türlerini etkiler.
Harita türüne stil uygulama
Aşağıdaki resimde, haritanın sol üst kısmındaki kontrolde Stilize Harita adlı ek bir harita türü gösterilmektedir. Kod örneğini görmek için Stil Verilmiş Harita Türleri'ne gidin.
Stil verilmiş bir harita türü oluşturmak için stil dizisini bir StyledMapType
nesnesine ayarlayın. Yeni bir stilize edilmiş harita türü oluşturmak, varsayılan harita türlerinin stilini etkilemez.
[[["Anlaması kolay","easyToUnderstand","thumb-up"],["Sorunumu çözdü","solvedMyProblem","thumb-up"],["Diğer","otherUp","thumb-up"]],[["İhtiyacım olan bilgiler yok","missingTheInformationINeed","thumb-down"],["Çok karmaşık / çok fazla adım var","tooComplicatedTooManySteps","thumb-down"],["Güncel değil","outOfDate","thumb-down"],["Çeviri sorunu","translationIssue","thumb-down"],["Örnek veya kod sorunu","samplesCodeIssue","thumb-down"],["Diğer","otherDown","thumb-down"]],["Son güncelleme tarihi: 2025-07-09 UTC."],[[["Customize the appearance of your maps using embedded JSON style declarations for the default map and selectable map types."],["Style features and elements within the map by creating an array of `MapTypeStyle` objects defining the desired appearance, with the `featureType`, `elementType`, and `stylers` properties determining specific modifications."],["Utilize the Maps Platform Styling Wizard to quickly generate JSON styling objects, simplifying the process of creating custom map styles."],["Apply styles to the default map by setting the `styles` property in the `MapOptions` object during map creation or by using the `Map.setOptions` method."],["Create styled map types by setting the style array to a `StyledMapType` object, enabling the addition of custom map styles without impacting the default map types."]]],["Custom styling for maps can be applied via embedded JSON style declarations to default maps or user-switchable map types. Create an array of `MapTypeStyle` objects specifying `featureType`, `elementType`, and `stylers` to define styling. For consistent styling across apps, use cloud customization with a map ID. Use the Maps Platform Styling Wizard to quickly generate JSON styling or apply styles by setting the map's `styles` property within the `MapOptions` object or the `Map.setOptions` method.\n"]]