i am using gmaps.js (https://github.com/hpneo/gmaps)
I want to add a Marker on the map on clicking a location on the map. If a user clicks on a second location the previous marker should move to the new place or be removed and replaced with a new marker.
Now sure if this is supported by the Lib.
http://bakasura.in/startupsradar/add.html
$(document).ready(function () { var map = new GMaps({ div: '#map', lat: 13.00487, lng: 77.576729, zoom: 13 }); map.addMarker({ lat: 13.00487, lng: 77.576729, title: 'Mink7', infoWindow: { content: 'HTML Content' } }); /* GMaps.geolocate({ success: function (position) { map.setCenter(position.coords.latitude, position.coords.longitude); }, error: function (error) { alert('Geolocation failed: ' + error.message); }, not_supported: function () { alert("Your browser does not support geolocation"); }, always: function () { //alert("Done!"); } }); */ });