IOS MKMapView sidewalk - ios

Im working with Mapkit and I trying to draw a line in the "sidewalks" (border of the street),right now I'm looking for ideas on how I could start this task, thanks for your help.
notes: I know how to works with mkpolyline and coordinates
http://s30.postimg.org/7rnmdjzu9/mapa.png

You do not have access to the information that qualifies as a road inside the MKMapView. so, in order to be able to draw into the border of the street you will need to access the information that qualifies as a street (the coordinates of the road) or analyzing the view and changing the specific color represented by the border of the street (this is not public API, you will need to dig around the view hierarchy).

Related

How to show indoor annotations on MKMapView

I need to show an indoor floor plan in a MKMapView. So far I have managed to load custom map tiles into MKMapView. But when I try to show annotations it does not show in correct location. The space between latitudes are not equal. I think it’s because MKMapView maps the globe into flat surface. But in my case I need to show annotations in a flat surface. Any idea how to do this?
EDIT : Anyone know how to convert geographic coordinates to cartesian coordinates? That will solve this problem
Apple just updated its demo project:
https://developer.apple.com/library/prerelease/ios/samplecode/footprint/Introduction/Intro.html
Take a look, there are information about how to translate geolocation (spherical) to flat location.

Finding out if a space is occupied by a road/building/water with MapKit? [duplicate]

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.
there is no foolproof way BUT CLGeocoder can reverse geocode a coordinate to an address and that would give you stuff like:
0/0 = ...., ocean
51/10 = ..., germany
-90/10 = ..... , united states
and so on

MapKit uber style map Center annotation

I would like to have a annotation in the center of the map, that does not move when the region is changed. That is, when one moves the map, the annotation stays in the center regardless. I have implemented this using NStimer, assigning the map center coordinate to the annotation every .001 seconds, however this is very choppy and doesn't look smooth.
I realize that I need to use an Overlay than convert the overlay annotation to coordinates on the map.
Pretty much it would look like what Uber has.
THe other solutions for this that I have seen have not used a normal annotation. Instead they put another view over the top of the map with the annotation image in the middle. It doesn't matter what happens to the map the view stays centered on the screen and if you do ever need to interact with it, you just ask the map what the center coordinate is at that time.
You can get the code from the following link:
https://github.com/scottrhoyt/CenterPinMapViewController

Find out which type of area you are in from MKMapView

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.
there is no foolproof way BUT CLGeocoder can reverse geocode a coordinate to an address and that would give you stuff like:
0/0 = ...., ocean
51/10 = ..., germany
-90/10 = ..... , united states
and so on

Drawing a circle on MapView with specifiec radius on Monondroid

I'm trying to draw a circle with specific radius in km (for example 2km) on a MapView at specific lat/lng. I've found some samples:
Creating Custom Overlay on the map
Draw A Circle On Android MapView
Draw circle of certain radius on map view in android
I think first and second of above are useful but these are in Java and I need code for Mono for Android (Monodevelop).
I can't find Projection class in monodroid.
And can't use com.google.android.maps.Projection.
Can somebody help me how to use these codes in monodroid?
com.google.android.maps.Projection is an interface, so it is made available in Mono for Android as Android.GoogleMaps.IProjection to keep with normal C# conventions.
Similarly, where you'd use mapView.getProjection() in Java, in C# it is made available via the Projection property on MapView.
Xamarin has some tutorials on their site that go over how to use these to create custom overlays, so I'd suggest checking them out.

Resources