How to manage visitor's path inside Google current position?

  1. How to manage visitor’s path inside Google map and the current position as sensor is TRUE?
  2. How to manage height and width with the CSS file not px but 100% width.Example: = ‘850px’;
  3. How to pull out value like coords inside variables into PHP?
<input type="hidden" data-geo="current_location" type="text" name="currentloc" readonly />


function success(position) {
 var mapcanvas = document.createElement('div'); = 'mapcontainer'; = '850px'; = '550px';


 var coords = new google.maps.LatLng(position.coords.latitude, position.coords.longitude);

 var options = {
 zoom: 15,
 center: coords,
 mapTypeControl: false,
 navigationControlOptions: {
  style: google.maps.NavigationControlStyle.SMALL
 mapTypeId: google.maps.MapTypeId.ROADMAP
 var map = new google.maps.Map(document.getElementById("mapcontainer"), options);

 var image = '';

 var marker = new google.maps.Marker(
  position: coords,
  map: map,
  title: "Your favourite location",
  icon: image



This topic was automatically closed 91 days after the last reply. New replies are no longer allowed.