drag-and-drop-maps-react

Google maps container with drag and drop functionality

Usage no npm install needed!

<script type="module">
  import dragAndDropMapsReact from 'https://cdn.skypack.dev/drag-and-drop-maps-react';
</script>

README

Google Map React with drag and drop functionality

This is a fork of Fullstack react's Google Maps wrapper with added drag and drop functionality.

Quickstart

First, install the library:

npm install --save drag-and-drop-maps-react

Then, add your pins as a background image with the class "drag".

<div class="markers">
    <div className="drag" style={{ backgroundImage: "url('http://maps.google.com/mapfiles/ms/micons/blue.png')" }}></div>
    <div className="drag" style={{ backgroundImage: "url('http://maps.google.com/mapfiles/ms/micons/green.png')" }}></div>
    <div className="drag" style={{ backgroundImage: "url('http://maps.google.com/mapfiles/ms/micons/yellow.png')" }}></div>
</div>

License

MIT