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

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

const url = open()

Search for Places

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

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

Search with Location

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

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

Search Near Location

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

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

Center Map

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

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

Center Map with Zoom

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

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

Create Pin

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

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

Satellite View

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

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

Display Address

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

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

Get Driving Directions

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

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

Get Walking Directions

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

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

Get Transit Directions

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

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

Get Full Directions

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

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