Nowy styl mapy będzie wkrótce dostępny w Google Maps Platform. Ta aktualizacja stylu mapy obejmuje nową domyślną paletę kolorów oraz ulepszenia ułatwiające obsługę i łatwość obsługi map. Wszystkie style mapy zostaną automatycznie zaktualizowane w marcu 2025 r. Więcej informacji o dostępności i sposobie włączania tej funkcji znajdziesz w artykule Nowy styl mapy w Google Maps Platform.
Ta strona pokazuje, jak renderować dane geograficzne w KML.
używając formatu GMUKMLParser w formacie
spójnik z GMUGeometryRenderer. Format KML jest popularny
do renderowania danych geograficznych, takich jak punkty, linie i wielokąty.
Na poniższym zrzucie ekranu widać przykładowe dane KML wyrenderowane na mapie:
Pełny przykładowy kod znajdziesz w sekcji z przykładowymi aplikacjami
wł.
GitHub.
Renderowanie danych KML
Aby wyrenderować dane KML na mapie, utwórz GMUKMLParser z
ścieżki do zasobu KML (w tym przykładzie KML_Sample.kml). Następnie:
utwórz GMUGeometryRenderer z wynikiem GMUKMLParser
instancji. Na koniec zadzwoń pod numer GMUGeometryRenderer.render().
następujący przykładowy kod pokazuje renderowanie danych KML na mapie:
[[["Łatwo zrozumieć","easyToUnderstand","thumb-up"],["Rozwiązało to mój problem","solvedMyProblem","thumb-up"],["Inne","otherUp","thumb-up"]],[["Brak potrzebnych mi informacji","missingTheInformationINeed","thumb-down"],["Zbyt skomplikowane / zbyt wiele czynności do wykonania","tooComplicatedTooManySteps","thumb-down"],["Nieaktualne treści","outOfDate","thumb-down"],["Problem z tłumaczeniem","translationIssue","thumb-down"],["Problem z przykładami/kodem","samplesCodeIssue","thumb-down"],["Inne","otherDown","thumb-down"]],["Ostatnia aktualizacja: 2024-09-20 UTC."],[[["This documentation explains how to render geographic data in KML format using the `GMUKMLParser` and `GMUGeometryRenderer` within the Google Maps SDK for iOS Utility Library."],["KML is a popular format used for displaying geographic data, including points, lines, and polygons, on maps."],["To render KML data, create a `GMUKMLParser` instance with the path to your KML file, then use it to initialize a `GMUGeometryRenderer`, and finally, call `render()` on the renderer to display the data on your map."],["Code examples in both Swift and Objective-C are provided to demonstrate the process of rendering KML data on a map using the Google Maps SDK for iOS."]]],[]]