Ok, I found a solution if anyone else will ever need it.
I added a UITapGestureRecognizer to my map view instance.
I used the MKMapView's convert(_:toCoordinateFrom:) to convert the touch point to the map coordinates
I created a MKMapPoint from that coordinate and checked if the MKPolygon renderer path contains the point
For the MKPolygon, being a MKShape after all, I used the .title property to assign my zone_id value parsed from the GeoJSON.
So I was able to identify which polygon was tapped.
I attached the code
MapView.swift
MapViewModel.swift
Topic:
App & System Services
SubTopic:
Maps & Location
Tags: