title: Google maps (google.maps.LatLng) change values lat lng
body: <p>Hello guys i have a problem when i use the method  google.maps.LatLng every time i use it automatically change the longitude value to a different value , that is too long to use in Google map so i can not add markers with location in my map.Does anybody know a different way to do it or what the problem is.I reatrive the data from a json sting and load it to an array check the code below.</p>
  
  <p>My latitude and longitude </p>
  
  <p><img src="https://i.stack.imgur.com/iytps.png" alt="lat,lng"></p>
  
  <p>After  use google.maps.LatLng latitude and longitude 
  <img src="https://i.stack.imgur.com/2Y2LR.png" alt="google.maps.LatLng"></p>
  
  <pre><code>var map;
  var markers = [];
  var child_details = [];
  
  function initialize() {
      var haightAshbury = new google.maps.LatLng(34.8055973, 32.4104341);
      var mapOptions = {
          zoom: 12,
          center: haightAshbury,
          mapTypeId: google.maps.MapTypeId.TERRAIN
      };
      map = new google.maps.Map(document.getElementById('map-canvas'),
          mapOptions);
  
      // This event listener will call addMarker() when the map is clicked.
      google.maps.event.addListener(map, 'click', function(event) {
          addMarker(event.latLng);
      });
  }
  
  
  function load_children(child_list) {
  
      var marker;
      var obj = JSON.parse(child_list);
  
      for (var i in obj) {
          child_details.push([obj[i].cid, obj[i].uid, obj[i].Name, obj[i].Surname,
              obj[i].lat, obj[i].lng, obj[i].timestamp,
              obj[i].Sensor
          ]);
      }
  
      setUpMarkers(map, child_details);
  }
  
  
  function setUpMarkers(map, locations) {
  
      alert('set up');
      for (var i = 0; i &lt; locations.length; i++) {
          var loc = locations[i];
          alert("lat" + loc[4] + "lng " + loc[5]);
          //The problem is here
          var myLatLng = new google.maps.LatLng(loc[4], loc[5]);
          //After i use this method to get Lat Lng i get wrong lng
          alert(myLatLng);
          var marker = new google.maps.Marker({
              position: myLatLng,
              map: map,
              title: loc[3]
  
          });
          markers.push(marker);
      }
  
  }
  
  
  // Add a marker to the map and push to the array.
  function addMarker(location) {
      var marker = new google.maps.Marker({
          position: location,
          map: map
      });
      markers.push(marker);
  
  }
  
  // Sets the map on all markers in the array.
  function setAllMap(map) {
      for (var i = 0; i &lt; markers.length; i++) {
          alert('adding marker' + markers[i]);
          markers[i].setMap(map);
      }
  }
  
  // Removes the markers from the map, but keeps them in the array.
  function clearMarkers() {
      setAllMap(null);
  }
  
  // Shows any markers currently in the array.
  function showMarkers() {
      setAllMap(map);
  }
  
  // Deletes all markers in the array by removing references to them.
  function deleteMarkers() {
      clearMarkers();
      markers = [];
  }
  </code></pre>