1.1.3 • Published 5 years ago
radius-widget v1.1.3
Radius widget
Uses Google maps API to set location and radius.
Installation
Make sure you have the latest version of node.js installed. Then run
$ npm install && npm run build
Usage
Include the form form from the index.html into your page. Then initialize the widget like so:
new RadiusWidget({
containerId: 'radius-widget', // Set the id of the outer container
formId: 'radius-widget-form', // Set the id of 'fake form' with the input fields
hideForm: Boolean(1), // Toggle display of form
// Optionally: Set the address for the map instead of using the form
address: {
street: 'Unter den Linden',
streetno: '1'
zipcode: '',
city: 'Berlin',
},
//initialZoom: 13 // Set some more zoom value initially
}).initMap();