Skip to content

Apple Maps ​

Apple Maps is a web mapping service developed by Apple Inc. It provides directions, estimated times of arrival, and daily commutes. Protocol Launcher allows you to generate deep links to open Apple Maps, search for locations, get directions, and explore places.

Usage ​

There are two ways to use this library:

  • On-Demand import from subpaths enables tree-shaking and keeps bundles small.
  • Full Import from the root package is convenient but includes all app modules.

Pick On-Demand for production builds; Full Import is fine for quick scripts or demos.

Select Installation Method

On-Demand
Recommended. Optimized for production.
Full Import
Convenient. Good for quick scripts.

Open Maps ​

{{currentMethod}}
ts
import { open } from 'protocol-launcher/apple-map'

const url = open()

Search for Places ​

{{currentMethod}}
ts
import { open } from 'protocol-launcher/apple-map'

const url = open({
  q: 'Food',
})

Search with Location ​

{{currentMethod}}
ts
import { open } from 'protocol-launcher/apple-map'

const url = open({
  q: 'Food',
  sll: '37.7749,-122.4194',
})

Search Near Location ​

{{currentMethod}}
ts
import { open } from 'protocol-launcher/apple-map'

const url = open({
  q: 'Food',
  near: '37.7749,-122.4194',
})

Center Map ​

{{currentMethod}}
ts
import { open } from 'protocol-launcher/apple-map'

const url = open({
  ll: '37.7749,-122.4194',
})

Center Map with Zoom ​

{{currentMethod}}
ts
import { open } from 'protocol-launcher/apple-map'

const url = open({
  ll: '37.7749,-122.4194',
  z: 15,
})

Create Pin ​

{{currentMethod}}
ts
import { open } from 'protocol-launcher/apple-map'

const url = open({
  q: 'Golden Gate Bridge',
  ll: '37.8199,-122.4783',
})

Satellite View ​

{{currentMethod}}
ts
import { open } from 'protocol-launcher/apple-map'

const url = open({
  t: 'k',
  ll: '37.7749,-122.4194',
})

Display Address ​

{{currentMethod}}
ts
import { open } from 'protocol-launcher/apple-map'

const url = open({
  address: '1 Infinite Loop Cupertino CA',
})

Get Driving Directions ​

{{currentMethod}}
ts
import { open } from 'protocol-launcher/apple-map'

const url = open({
  daddr: 'San Francisco',
  dirflg: 'd',
})

Get Walking Directions ​

{{currentMethod}}
ts
import { open } from 'protocol-launcher/apple-map'

const url = open({
  daddr: 'Union Square',
  dirflg: 'w',
})

Get Transit Directions ​

{{currentMethod}}
ts
import { open } from 'protocol-launcher/apple-map'

const url = open({
  daddr: 'Fisherman\'s Wharf',
  dirflg: 'r',
})

Get Full Directions ​

{{currentMethod}}
ts
import { open } from 'protocol-launcher/apple-map'

const url = open({
  saddr: 'San Jose',
  daddr: 'San Francisco',
  dirflg: 'd',
})