Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

google-map-js

Package Overview
Dependencies
Maintainers
1
Versions
10
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

google-map-js

Pass form latitude longititude and to latitude longitude to get the route for the two points with google api.

  • 1.0.3
  • npm
  • Socket score

Version published
Weekly downloads
1
decreased by-80%
Maintainers
1
Weekly downloads
 
Created
Source

google-map-js

-> npm i google-map-js

google-map-js

Example:

This example is get 2 points routes and distance calculate

const latitudeA = 00.000000; // Latitude of point A const longitudeA = 00.000000; // Longitude of point A const latitudeB = 00.000000; // Latitude of point B const longitudeB = 00.000000; // Longitude of point B

const mapDistanceCalculater = require('google-map-js')

const data = await mapDistanceCalculater.DirectionsService(latitudeA, longitudeA, latitudeB, longitudeB, 'Google map api key');

data returns

{ { routeDetails: Returns full details of distance route details, mapDistanceUrl: Distance map URL, distance: Distance with miles in 2 digits } }

Address using to get the latitude longitude

const mapDistanceCalculater = require('google-map-js')

const data = await mapDistanceCalculater.GetAddressToLatitudeLongitude('Your address', 'Google map api key');

data returns

{ { latitude: Repective address latitude, longitude: Repective address longitude } }

FAQs

Package last updated on 16 Jun 2023

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc