Sample Code

Optimizing Map Views with Filtering and Camera Constraints

Display a map that is relevant to the user by filtering points of interest and search results, and constraining the visible region.

Download

Overview

This sample code demonstrates three features that can make a map relevant to your users:

  • Constraining the map view’s visible region and zoom to keep the desired areas in view.

  • Filtering the points of interest to reduce the clutter on the map view.

  • Filtering search result types and points of interest to improve to search and autocompletion.

See Also

Points of Interest

MKPointOfInterestFilter

A list that specifies point of interest categories to be included or excluded in a map view, local search, or local search completer.

Beta
MKPointOfInterestCategory

Point of interest categories.

Beta

Beta Software

This documentation contains preliminary information about an API or technology in development. This information is subject to change, and software implemented according to this documentation should be tested with final operating system software.

Learn more about using Apple's beta software