is there any way to determine which type of area you are in from a MKMapView? I.e. if the centre of the map is in the ocean we can tell the user: the centre of the map is above the ocean, or if the map is centred above a green area: the centre of the map is above parkland...
The only way I can think of to do this is to create a screenshot of the visible screen and analyse the colour of each bit by using some method such as this: iOS -- detect the color of a pixel?
However I would be interested to know if there is an easier way that anyone can think of!
EDIT
To make it more clear what I'm looking for, I'm basically looking for a way to turn a section of a map into a top down level for a game, with different areas determined by the areas of the map...
A CLPlacemark
has a couple of properties: inlandWater
and ocean
which tell you when the placemark is in water. I think you can get a placemark from the geocoder.
It also has areasOfInterest
which will give you parks and landmarks.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With