How can I implement the custom drawing search tool used in the Realtor iPad?

The Realtor iPad application did a very good job of introducing a special drawing tool on top of Mapkit, which they use to query the area for the home. I am familiar with mapkit and its related classes, but I don’t know how I could make some kind of custom finger drawing and translate it into a geospatial query. How to do it?

+5
source share
1 answer

I'm not sure how far you have come along this path, but your basic algorithm should look like this:

  • Draw a polygon on top of your map, and then translate the coordinates of this polygon into the "map" coordinates. To do this, you probably need to listen for gestures in a view other than the MKMapKit instance. Given my limited knowledge regarding MapKit event handling, you may need to overlay a transparent view on the map when you want to draw, so touch events will not go into MapKit (if that makes sense). You use your finger to pinch, zoom, pan, and you will not want to use this function if you are trying to draw. In this view, you draw a shape that traces the user's finger, and then translate the points drawn at the points on the map.

    The docs show that you can translate screen points to map points using the method convertPoint:toCoordinateFromView:on MKMapView.

    : MapKit

    , : Google MapKit

  • , , "" . . - . , . , (X, Y) , . , .

    , .

    https://math.stackexchange.com/questions/237/how-do-you-determine-if-a-point-sits-inside-a-polygon

    - -, . . , .

, , , .

, , SQLite SQL Server Spatial . , . .

, ESRI SDK iOS. ESRI . , , API:

http://resources.arcgis.com/en/communities/runtime-ios-sdk/

+1

All Articles