The following function is called when the user moved the map.
It is possible to get the viewport? Viewport is latitude and longitude of north/east and the lat. and lon. of south/west.
func mapView(mapView: MKMapView, regionDidChangeAnimated animated: Bool){
print("The \(mapView.centerCoordinate)")
print("the maprect \(mapView.visibleMapRect.origin)")
print("the maprect \(mapView.visibleMapRect.size)")
//I find just this attributes for mapView
}
I don't know how get the viewports out of my data. I can't find anything in the www.
The destination is that I log the coordinates with google analytics and another tool evaluate the datas.
Has somebody an idea? Thanks a lot