开发者

Selecting a location with MapKit

Is there a best practice or common pattern for allowing users to select a precise location on a map using MapKit?

I've seen examples where a user can enter an address in a search box. Bu开发者_StackOverflowt what about the case where a user doesn't know the exact address and wants to select a location from the map?


It's a bit more complex task than it seems.

Here is the guide how to detect single taps on a Web View.

I've used the same pattern to detect single taps on Map View but allowing zooming and dragging at the same time.

Hope it helps.


I would say that replicating the Maps application is close to a best practice for map applications.

You can test it for yourself; tap and hold somewhere on the map and a pin that you can move around by dragging will be dropped where you held your finger.


The Google Maps app seems to tackle what is a reasonable idea by touching the map by instead allowing you to drop a pin on the map; the SO post might help out.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜