1.0.4 • Published 2 years ago

@fidenz/maposm v1.0.4

Weekly downloads
-
License
-
Repository
-
Last release
2 years ago

osm-map-lib

maposm widget library is based on OpenStreetMap and Entur API. maposm can be used as either a CDN resource or a NodeJS module.

Features

  • Transportation route between 2 locations with several transportation methods.
    • Walk
    • Car
    • Bicycle
    • Flexible
      • Bus
      • Tram
      • Metro
      • Rail
  • Stop places in the currenly visible map bounds

Packaging

npm i
npm run build

Installation

CDN resource

Import the {MAPOSM_LIB_DIR}\dist\cdn\bundle.js using script tag.

Node module

npm i {MAPOSM_LIB_DIR}\dist\module

Install package from remote NPM registry

npm i @fidenz/maposm

Initialization

Create a DOM element to work as the map container. Element id is used when initializing OSM map.

    <div
        id="osm-map"
        style="width: 70vw; height: 75vh">
    </div>

Initialize the OSM map using maposm lib.

Module

    import {initMap} from 'maposm';

    initMap("osm-map");

CDN

    <script>
        maposm.initMap("osm-map");
    </script>
1.0.4

2 years ago

1.0.3

2 years ago

1.0.2

2 years ago

1.0.1

2 years ago

1.0.0

2 years ago