1.2.0 • Published 1 year ago

widget-xygo v1.2.0

Weekly downloads
-
License
ISC
Repository
github
Last release
1 year ago

xygo-widget

Map widget with integrated Xygo searcher

Installation

npm install widget-xygo

Dev usage

Import the package

import { Widget } from 'widget-xygo';

Instantiate the class

const widget = new Widget ({
  apiKey: 'xxxxxxxxxxxxxxxxxxxx', // provide arcgis developer api key. Required
  token: 'xxxxxxxxxxxxxxxxxxxxx', // provide security token. Required
  position: 'bottom-left' || 'bottom-right' || 'top-left' || 'top-right' , // optional property: default value is 'bottom-right'
  button: true || false // optional property: default value is false
});

Get address or coordinates

Capture the address or coordinates of a specific point with a click on the map.

const address = await widget.getAddress()

Usage

Search by address

Enter an address into the search box
Select the country
Press the Enter key or the Submit button.

Response:

Search by coordinates

Enter coordinates into the search box with the following format: latitude, longitude

Example: -33.44356568, -70.62951751

Response:

Try it

Go to this website and test the widget by looking for addresses!

1.2.0

1 year ago

1.1.8

1 year ago

1.1.7

1 year ago

1.1.6

1 year ago

1.1.5

1 year ago

1.1.4

1 year ago

1.1.3

1 year ago

1.1.2

1 year ago

1.1.1

1 year ago

1.1.0

1 year ago

1.0.2

1 year ago

1.0.1

1 year ago

1.0.0

1 year ago