0.1.11 • Published 5 months ago

geo-leaflet v0.1.11

Weekly downloads
-
License
MIT
Repository
github
Last release
5 months ago

geo-leaflet

Some functions are available to make it easier to generate a map, capture coordinates through a Google Map URL or even geolocation

Description

This library is based on Leaflet.js, a JavaScript library for mobile-friendly interactive maps.

Installation

Use the command

npm i geo-leaflet

Usage

Capture coordinates via Google Maps url

Please use the following function to capture coordinates from a Google Map URL

Remember to add the url string in object!

import { GetLatLngGoogleUrl } from 'geo-leaflet';

export const MyComponent = () => {
   const coordinatesUrl = GetLatLngGoogleUrl({url:'https://www.google.com/maps/place/Londres,+Reino+Unido/@51.5287398,-0.2664034,11z/data=!3m1!4b1!4m6!3m5!1s0x47d8a00baf21de75:0x52963a5addd52a99!8m2!3d51.5072178!4d-0.1275862!16zL20vMDRqcGw?entry=ttu'})

   console.log({coordinatesUrl})

}

Output: (Object)

coordinatesUrl:{
   "lat": 51.5072178,
   "lng": -0.1275862
   }

Generate map with location points

(In creation)

0.1.10

5 months ago

0.1.11

5 months ago

0.1.9

5 months ago

0.1.6

5 months ago

0.1.5

5 months ago

0.1.4

5 months ago

0.1.3

5 months ago

0.1.2

5 months ago

0.1.1

5 months ago

0.1.0

5 months ago