mercredi 25 avril 2018

passing variabels javascript to blade laravel

i create map with google map Api and i get latitude et longitude position marker and i want to passing this values to my blade and use it . how i can do that

     function placeMarker(location) {
          if ( marker ) {
            marker.setPosition(location);
              positionLat=  marker.getPosition().lat();
              positionLng= marker.getPosition().lng();

          } else {
            marker = new google.maps.Marker({
              position: location,
              map: map,
              title:'هنا يقع العقار',
              icon:markerUrl,
            });
              positionLat=  marker.getPosition().lat();
              positionLng= marker.getPosition().lng();
          }
          //my variabels 

            console.log(positionLat);
            console.log(positionLng);
        }



via Chebli Mohamed

Aucun commentaire:

Enregistrer un commentaire