1.1.8-beta • Published 2 years ago

perare-web-sdk v1.1.8-beta

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

Perare WEB Sdk package for displaying Proplink-verified map-widget on your webstie

šŸ  Homepage

Install

npm install perare-web-sdk

Add those two style files to the bundle (e.g. with Webpack)

- "mapbox-gl/dist/mapbox-gl.css",
- "perare-web-sdk/dist/index.css"

If you're using a CSS loader like webpack css-loader, you can import the CSS directly in your JavaScript/Typescript.

import 'mapbox-gl/dist/mapbox-gl.css';
import 'perare-web-sdk/dist/index.css';

Or add those css files as externally-added to bundle css files.

Bundle size

This package depends on mapbox-gl-js, which is quite big package. Almost all map initializations are cached, but to prevent increased initial-bundle size, use lazy-loading of component/module.

Usage

import { PerareWebSdk } from "perare-web-sdk";

// first you need to create and wait toapprove of proplink
const id = createdProplink.id;
PerareWebSdk.register({
    token: '<YOUR_TOKEN>',
    apiUrl: '<SANDBOX/PROD API URL>',
});

PerareWebSdk.drawMapBanner({
    container: document.getElementById('perare-map-banner'),
    proplinkId: id,
});

Demo page

Coming soon

Author

šŸ‘¤ Perare

1.1.8-beta

2 years ago

1.1.7-beta

2 years ago

1.1.5-beta

2 years ago

1.1.2-beta

2 years ago

1.1.1-beta

2 years ago

1.1.4-beta

2 years ago

1.1.3-beta

2 years ago

1.1.0-beta

2 years ago

1.1.6-beta

2 years ago

1.0.22-beta

2 years ago

1.0.21-beta

2 years ago

1.0.19-beta

2 years ago

1.0.18-beta

2 years ago

1.0.17-beta

2 years ago

1.0.16-beta

2 years ago

1.0.15-beta

2 years ago

1.0.14-beta

2 years ago

1.0.13-beta

2 years ago

1.0.12-beta

2 years ago

1.0.11-beta

2 years ago

1.0.10-beta

2 years ago

1.0.9-beta

2 years ago

1.0.7-beta

2 years ago

1.0.6-beta

2 years ago

1.0.5-beta

2 years ago

1.0.4-beta

2 years ago

1.0.3-beta

2 years ago

1.0.2-beta

2 years ago

1.0.1-beta

2 years ago

1.0.0-beta

2 years ago