Support » Plugin: Comprehensive Google Map Plugin » geolocation with navigation from start pos.

  • using

    [ Moderator note: please wrap code in backticks or use the code button. ]

    // Try HTML5 geolocation
      if(navigator.geolocation) 
    
      {
        navigator.geolocation.watchPosition(function(position) {
          var pos = new google.maps.LatLng(position.coords.latitude,
                                           position.coords.longitude); 
    
           var directionsService = new google.maps.DirectionsService();
           var directionsDisplay = new google.maps.DirectionsRenderer();
           var infowindow = new google.maps.InfoWindow({
    
            map: map,
            position: pos,
            content: 'Hier bent U'
          });
    	 var placeMarker = new google.maps.Marker({
           position: pos,
           map: map
         });

    inside the code and using

    var start = marker.content(placemarker);
                                                    start = start.replace("Lat/Long: ", "");
    
    						$(parentInfoBubble + ' a.dirToHereTrigger').live("click", function() {
    							var thisId = this.id;
    							if (thisId == 'toHere-' + localBubbleData.bubbleHolderId) {
    								$(dirDivId).fadeIn();
    								$(dirDivId + ' input#a_address').val(start);
    								$(dirDivId + ' input#b_address').val(addy);
    								$(dirDivId + ' input#radio_km').attr("checked", "checked");

    where without placemarker in var start = marker.content(placemarker); the code mimics the addy part.

    it gives me the location of my geo mashup markers. i want the

    var start = marker.content(placemarker);
                                                    start = start.replace("Lat/Long: ", ""); to give the location

    of the placemarker wich is the marker of my geolocation

    so basicly with the geo function from my script i wanna use .val from adress a to the lat long of my geolocation(mylocation) pin.

    been strugeling with this all day. is there anybody who knows if it it posible to link the marker.content part to the specific placemarker ?

    http://wordpress.org/plugins/comprehensive-google-map-plugin/

Viewing 1 replies (of 1 total)
Viewing 1 replies (of 1 total)
  • The topic ‘geolocation with navigation from start pos.’ is closed to new replies.