मैप की नई स्टाइल, जल्द ही Google Maps Platform पर उपलब्ध होगी. मैप की स्टाइल में हुए इस अपडेट में, नया डिफ़ॉल्ट कलर पटल जोड़ा गया है. साथ ही, मैप के अनुभवों और उसे इस्तेमाल करने के तरीके में सुधार भी किए गए हैं. मार्च 2025 में, सभी मैप स्टाइल अपने-आप अपडेट हो जाएंगी. उपलब्धता और जल्दी ऑप्ट इन करने के तरीके के बारे में ज़्यादा जानकारी के लिए, Google Maps Platform के लिए नई मैप स्टाइल देखें.
इस पेज में आपको GeoJSON में भौगोलिक डेटा को रेंडर करने का तरीका बताया गया है
GMUGeoJSONParser का इस्तेमाल करके,
GMUGeometryRenderer के साथ संयोजन में. GeoJSON लोकप्रिय है
फ़ॉर्मैट का इस्तेमाल करें.
कोड का पूरा सैंपल देखने के लिए, सैंपल ऐप्लिकेशन देखें
चालू
GitHub.
GeoJSON डेटा को रेंडर किया जा रहा है
मैप पर GeoJSON डेटा को रेंडर करने के लिए, GMUGeoJSONParser बनाएं
GeoJSON संसाधन का पाथ (इस में GeoJSON_sample.kml
उदाहरण के लिए). फिर, एक GMUGeometryRenderer बनाएं और
GMUKMLParser इंस्टेंस. आख़िर में, कॉल करें
GMUGeometryRenderer.render(). कोड का यह उदाहरण दिखाता है
मैप पर GeoJSON डेटा को रेंडर करना:
Swift
import GoogleMapsUtils
class GeoJSON {
private var mapView: GMSMapView!
func renderGeoJSON() {
guard let path = Bundle.main.path(forResource: "GeoJSON_sample", ofType: "json") else {
return
}
let url = URL(fileURLWithPath: path)
let geoJsonParser = GMUGeoJSONParser(url: url)
geoJsonParser.parse()
let renderer = GMUGeometryRenderer(map: mapView, geometries: geoJsonParser.features)
renderer.render()
}
}
[[["समझने में आसान है","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"]],["आखिरी बार 2024-09-05 (UTC) को अपडेट किया गया."],[[["This page demonstrates how to render geographic data in GeoJSON format on Google Maps using the `GMUGeoJSONParser` and `GMUGeometryRenderer`."],["GeoJSON is a commonly used format for displaying geographic data like points, lines, and polygons."],["You'll need to set up the Maps SDK for iOS Utility Library before using `GMUGeoJSONParser`."],["The provided code examples show how to render GeoJSON data on a map in both Swift and Objective-C."]]],["The document explains how to render GeoJSON data on a map using the `GMUGeoJSONParser` and `GMUGeometryRenderer` from the Maps SDK for iOS Utility Library. First, a `GMUGeoJSONParser` is created with the GeoJSON resource path. Then, a `GMUGeometryRenderer` is initialized with the map view and the parser's features. Finally, the `GMUGeometryRenderer.render()` method is called to display the GeoJSON data, such as points, lines, and polygons, on the map.\n"]]