@@ -107,61 +107,83 @@ Future<ApiResponse<List<MapBoxPlace>>> getPlaces() =>
107107 );
108108```
109109
110+ ### Batch Geocoding (v6)
111+ Perform multiple geocoding queries (forward, reverse, or structured) in a single request.
112+
113+ ``` dart
114+ var geocoding = GeoCodingApiV6(
115+ apiKey: 'API Key', // or use MapBoxSearch.init('API KEY')
116+ limit: 5,
117+ );
118+
119+ Future<ApiResponse<BatchGeocodingResponse>> getBatch() =>
120+ geocoding.batch([
121+ ForwardQuery(query: "Eiffel Tower", limit: 1),
122+ ReverseQuery(location: (lat: 40.6892, long: -74.0445), limit: 1),
123+ ]);
124+ ```
125+
110126### Static Image
127+
111128``` dart
112- MapBoxStaticImage staticImage = MapBoxStaticImage (
113- apiKey: 'API Key', // dont pass if you have set it in MapBoxSearch.init('API KEY')
129+ StaticImage staticImage = StaticImage (
130+ apiKey: 'API Key', // or use MapBoxSearch.init('API KEY')
114131 );
115132```
116133
117134### Image With Polyline
118135``` dart
119136 String getStaticImageWithPolyline() => staticImage.getStaticUrlWithPolyline(
120- point1: Location (lat: 37.77343, lng : -122.46589),
121- point2: Location (lat: 37.75965, lng : -122.42816),
122- marker1: MapBoxMarker( markerColor: Colors.black,
123- markerLetter: MakiIcons.aerialway.value,
124- markerSize: MarkerSize.LARGE),
137+ point1: (lat: 37.77343, long : -122.46589),
138+ point2: (lat: 37.75965, long : -122.42816),
139+ marker1: MapBoxMarker( markerColor: const RgbColor(0, 0, 0),
140+ markerLetter: 'p',
141+ markerSize: MarkerSize.LARGE),
125142 marker2: MapBoxMarker(
126- markerColor: Color.rgb (244, 67, 54),
143+ markerColor: const RgbColor (244, 67, 54),
127144 markerLetter: 'q',
128145 markerSize: MarkerSize.SMALL),
129146 height: 300,
130147 width: 600,
131- zoomLevel: 16,
132- style: MapBoxStyle.Mapbox_Dark,
133- path: MapBoxPath(pathColor: Color.rgb(255, 0, 0), pathOpacity: 0.5, pathWidth: 5),
134- render2x: true);
135- ```
148+ zoomLevel: 15.5,
149+ style: MapBoxStyle.Dark,
150+ path: MapBoxPath(pathColor: const RgbColor(255, 0, 0), pathOpacity: 0.5, pathWidth: 5, pathPolyline: "%7DrpeFxbnjVsFwdAvr%40cHgFor%40jEmAlFmEMwM_FuItCkOi%40wc%40bg%40wBSgM"),
151+ render2x: true,
152+ center: (lat: 37.766541503617475, long: -122.44702324243272), // Required when auto is false
153+ // auto: true, // Alternatively, use auto: true to automatically fit markers and path
154+ );
155+ ```
136156
137157### Image with Marker
138158``` dart
139159String getStaticImageWithMarker() => staticImage.getStaticUrlWithMarker(
140- center: Location (lat: 37.77343, lng : -122.46589),
160+ center: (lat: 37.77343, long : -122.46589),
141161 marker: MapBoxMarker(
142- markerColor: Color.rgb (0, 0, 0), markerLetter: 'p', markerSize: MarkerSize.LARGE),
162+ markerColor: const RgbColor (0, 0, 0), markerLetter: 'p', markerSize: MarkerSize.LARGE),
143163 height: 300,
144164 width: 600,
145165 zoomLevel: 16,
146- style: MapBoxStyle.Mapbox_Streets ,
166+ style: MapBoxStyle.Streets ,
147167 render2x: true,
148168);
149169```
150170
151171### Image without Marker
152172``` dart
153173String getStaticImageWithoutMarker() => staticImage.getStaticUrlWithoutMarker(
154- center: Location (lat: 37.75965, lng : -122.42816),
174+ center: (lat: 37.75965, long : -122.42816),
155175 height: 300,
156176 width: 600,
157177 zoomLevel: 16,
158- style: MapBoxStyle.Mapbox_Outdoors ,
178+ style: MapBoxStyle.Outdoors ,
159179 render2x: true,
160180 );
161181```
162- # Screenshots
163182
164- ## Static Map Image
183+ ### Example App
184+ Check out the ` example/ ` directory for a complete Flutter application demonstrating:
185+ - Forward & Reverse Geocoding
186+ - Batch Geocoding
187+ - Static Images (Markers, Polylines, Auto-framing)
165188
166- <img src =" https://github.com/ketanchoyal/mapbox_search/raw/dev/Screenshots/staticImages.png " alt =" Static Map Image " />
167189
0 commit comments