1.0.0-beta7 • Published 6 years ago

@parkmobile/map v1.0.0-beta7

Weekly downloads
1
License
MIT
Repository
-
Last release
6 years ago

parkmobile-map

Add a simple ParkMobile map to any site and display nearby parking locations.

Installation

yarn add @parkmobile/map

or use the UMD build

<script src="https://unpkg.com/@parkmobile/map"></script>

Getting Started

Add the map to your static site

<script src="https://unpkg.com/@parkmobile/map"></script>
<script>
  ParkmobileMap(document.getElementById('app'), {
    center: {
      lat: 33.775591,
      lng: -84.39219,
    },
    googleApiKey: 'my key',
    sourceAppKey: 'my source app key',
  });
</script>

Use the JavaScript library in your application

import ParkmobileMap from '@parkmobile/map';

ParkmobileMap(document.getElementById('app'), {
  center: {
    lat: 33.775591,
    lng: -84.392190,
  },
  googleApiKey: 'my key',
  sourceAppKey: 'my source app key',
});

API

ParkmobileMap(target: Node, options: Object)

  • Initialize a Parkmobile Map widget using the target HTML Node and provided options.

Map Options

center: Object - Required
  • Specify the starting point by providing an object with lat and lng properties.
googleApiKey: String - Required
  • Provide a valid Google Maps API key
sourceAppKey: String
  • Provide a valid ParkMobile Source App Key to restrict search results. Defaults to parkmobileWeb.