Maps apple com daddr

Apple URL Scheme Reference

The maps URL scheme is used to show geographical locations and to generate driving directions between two points. If your app includes address or location information, you can use map links to open that information in the Maps app in iOS or macOS.

Unlike some schemes, map URLs do not start with a “maps” scheme identifier. Instead, map links are specified as regular http links and are opened either in Safari or the Maps app on the target platform.

Table 5-1 lists the supported parameters along with a brief description of each.

Table 5-1 Supported Apple Maps parameters

The map type. If you don’t specify one of the documented values, the current map type is used.

m (standard view)

k (satellite view)

The query. This parameter is treated as if its value had been typed into the Maps search field by the user. Note that q=* is not supported

The q parameter can also be used as a label if the location is explicitly defined in the ll or address parameters.

A URL-encoded string that describes the search object, such as “pizza,” or an address to be geocoded

The address. Using the address parameter simply displays the specified location, it does not perform a search for the location.

An address string that geolocation can understand.

A hint used during search. If the sll parameter is missing or its value is incomplete, the value of near is used instead.

A comma-separated pair of floating point values that represent latitude and longitude (in that order).

The location around which the map should be centered.

The ll parameter can also represent a pin location when you use the q parameter to specify a name.

A comma-separated pair of floating point values that represent latitude and longitude (in that order).

The zoom level. You can use the z parameter only when you also use the ll parameter; in particular, you can’t use z in combination with the spn or sspn parameters.

A floating point value between 2 and 21 that defines the area around the center point that should be displayed.

The area around the center point, or span. The center point is specified by the ll parameter.

You can’t use the spn parameter in combination with the z parameter.

A coordinate span (see MKCoordinateSpan ) denoting a latitudinal delta and a longitudinal delta.

The source address to be used as the starting point for directions.

A complete directions request includes the saddr , daddr , and dirflg parameters, but only the daddr parameter is required. If you don’t specify a value for saddr , the starting point is “here.”

An address string that geolocation can understand.

The destination address to be used as the destination point for directions.

A complete directions request includes the saddr , daddr , and dirflg parameters, but only the daddr parameter is required.

An address string that geolocation can understand.

The transport type.

A complete directions request includes the saddr , daddr , and dirflg parameters, but only the daddr parameter is required. If you don’t specify one of the documented transport type values, the dirflg parameter is ignored; if you don’t specify any value, Maps uses the user’s preferred transport type or the previous setting.

r (by public transit)

The search location. You can specify the sll parameter by itself or in combination with the q parameter. For example, http://maps.apple.com/?sll=50.894967,4.341626&z=10&t=s is a valid query.

A comma-separated pair of floating point values that represent latitude and longitude (in that order).

The screen span. Use the sspn parameter to specify a span around the search location specified by the sll parameter.

A coordinate span (see MKCoordinateSpan ) denoting a latitudinal delta and a longitudinal delta.

You can use the maps URL scheme to help the user:

Perform a search

Get directions to a location

View a specific location

To perform a search, supply a properly encoded URL string as the value of the q parameter. For example:

To specify a location for search, you can supply a value for the near parameter, or combine the sll parameter with either the z or sspn parameters. You can also set the map type using the t parameter, as shown here:

To provide navigation directions from one location to another, supply the start and destination addresses in the saddr and daddr parameters as shown below. You can also supply much more detail for the start and destination addresses than is shown here.

To specify a transport type, you can use the dirflg parameter as shown here:

You can omit the start address when you want to provide directions “from here.” The following example shows a search from here that provides driving directions in a hybrid map.

To display a specific location, use the ll parameter to center the map at the specified position as shown here:

Another way to display a location is to specify an address, such as:

If you use both the ll and address parameters, ll takes precedence over address . If you include a name in the value of the q parameter, Maps tries to match the name at the specified location.

Copyright © 2017 Apple Inc. All Rights Reserved. Terms of Use | Privacy Policy | Updated: 2017-09-19

Источник

Maps on the Web

MapKit JS brings interactive maps to your website — complete with annotations, overlays, and interfaces to Apple Maps services, such as search and directions. And now with Snapshots, you can create custom map images for your website without requiring JavaScript.

MapKit JS Examples

Use the JavaScript sample code below to easily add Maps functionality to your websites. To communicate with Maps services, set up your Maps identifiers, keys, and tokens in your developer account.

GeoJSON Import

View description and code

Region and Zoom Limits

View description and code

Embed

View description and code

Add Annotations

View description and code

Custom Callout

View description and code

Draggable Annotations

View description and code

MapKit JS Dashboard

Track your website’s use of Apple Maps services with the MapKit JS Dashboard. Monitor map initializations and service requests in realtime, or see up to a year of activity by day, week, month, or year.

MapKit JS beta provides a free daily limit of 250,000 map views and 25,000 service calls per Apple Developer Program membership. For additional capacity needs, contact us.

Snapshots

Snapshots are static map images retrieved from a URL that you can customize to display a region of the world, mark specific points with different styles of annotations and overlays, show the Dark Mode map, and more. Use Snapshots whenever you don’t need an interactive map or where you’d use a typical image URL — for example, in webpages and in places where JavaScript isn’t available such as email clients. Snapshots offer a free daily limit of 25,000 unique requests per day, with Apple Developer Program membership. For additional capacity needs, contact us.

Snapshots Studio. To get started, try out Snapshots Studio, a new tool that makes it easy to create Snapshots.

Introducing MapKit JS

Bring Apple Maps to your website with a variety of interactive features.

Getting and Using a MapKit JS Key

Learn how to create, protect, and use site-specific keys.

Documentation

Browse documentation, including the latest API reference, articles, and sample code.

Discussion Forums

Ask questions and discuss development topics with Apple engineers and other developers.

Embed

Create an embedded map in an element on the page.

Источник

Читайте также:  Айфон скопировать где искать
Оцените статью