embedded-map-scraper
v1.0.6
Published
Gives you a url to use inside of an iframe to generate a embedded map on your website without using google's api
Downloads
8
Maintainers
Readme
Embedded map scraper
a scraper to partially replace the maps javascript API
How to use
* ## installation
- Download the package
npm i embedded-map-scraper
Usage
Importing
- import the package like this
const scraper = require("embedded-map-scraper")
or like thisimport scraper from "embedded-map-scraper"
- import the package like this
Functionality
getIframeSrcCoords
- returns a URL intended to be used as the src parameter in the<iframe>
HTML tag, the iframe will display a map with a pin on the specified coordinates, PARAMS:- lat: latitude of the location where the pin is located (Number from -90 to 90)
- lng: longitude of the location where the pin is located (Number from -180 to 180)
- zoom: level of zoom (Number from 1 to 19)
- satellite: will the satellite or map images be used (Boolean)
getIframeSrcSearch
- returns a URL intended to be used as the src parameter in the<iframe>
HTML tag, the iframe will display a map with a pin on the location of the search term or nowhere if the location can't be found, PARAMS:- searchTerm: the search term (String)
- zoom: level of zoom (Number from 1 to 19)
- satellite: will the satellite or map images be used (Boolean)
getIframeSrcNoPin
- returns a URL intended to be used as the src parameter in the<iframe>
HTML tag, the iframe will display a map with no pin, PARAMS:- satellite: will the satellite images be used (Boolean)
- zoom: level of zoom (Number from 1 to 19)