Ankit Vyas
Ankit Vyas

Reputation: 7501

How can i generate overlay for weather api on MKMapView?

I don't have idea about overlay.I am stuck at this point.I am integration one of Weather API and it returns me several values now i want see all that value on the mapView it self so i need to integrate overlay on the mapView.Please help me how can i add overlay for displaying weather information on the MapView?.I am receiving this kind of response.

{"weatherObservation":{"clouds":"n/a","weatherCondition":"n/a","observation":"VOBL 240600Z 09011KT 060V130 CAVOK 24/03 Q1018 NOSIG","windDirection":90,"ICAO":"VOBL","elevation":915,"countryCode":"IN","lng":77.7,"temperature":"24","dewPoint":"3","windSpeed":"11","humidity":25,"stationName":"BENGALURU","datetime":"2012-01-24 06:00:00","lat":13.2,"hectoPascAltimeter":1018}}

enter image description here

I want to show this kind of effect on my MapView using overlay.

Upvotes: 2

Views: 842

Answers (1)

Ankit Vyas
Ankit Vyas

Reputation: 7501

MKMapKit provides MKPolygon class and add overlay to achieve this. This can be done with easy four steps

  1. Initialize map

  2. Get coordinates

  3. Create Polygon and add to map.

  4. Implement delegate

For more detail see here

Upvotes: 2

Related Questions