Thread Starter
themc
(@themc)
as promised the screenshot.
watch it before the link expires.
http://tinypic.com/r/25ezn6e/5
+ if somebody could help me with the directions from here or to here (geolocation start point) part…. it would make my day.
Thread Starter
themc
(@themc)
small fix i noticed while testing i deleted the
$(dirDivId + ‘ input#b_address’).val(addy); from the first field.
this makes it so the to here wasnt working correctly you can fix it by putting the line above under the input a value by searching for addy in the script.
or bij replacing the following content
[ Moderator note: please wrap code in backticks or use the code button. ]
var addy = marker.content;
addy = addy.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('');
$(dirDivId + ' input#radio_km').attr("checked", "checked");
}
});
$(parentInfoBubble + ' a.dirFromHereTrigger').live("click", function() {
var thisId = this.id;
if (thisId == 'fromHere-' + localBubbleData.bubbleHolderId) {
$(dirDivId).fadeIn();
$(dirDivId + ' input#a_address').val(addy);
$(dirDivId + ' input#b_address').val('');
$(dirDivId + ' input#radio_km').attr("checked", "checked");
}
});
<strong>with </strong>
var addy = marker.content;
addy = addy.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('');
$(dirDivId + ' input#b_address').val(addy);
$(dirDivId + ' input#radio_km').attr("checked", "checked");
}
});
$(parentInfoBubble + ' a.dirFromHereTrigger').live("click", function() {
var thisId = this.id;
if (thisId == 'fromHere-' + localBubbleData.bubbleHolderId) {
$(dirDivId).fadeIn();
$(dirDivId + ' input#a_address').val(addy);
$(dirDivId + ' input#b_address').val('');
$(dirDivId + ' input#radio_km').attr("checked", "checked");
}
});
Thread Starter
themc
(@themc)
i got it all fixed including the to here from here.
so the script is finally complete.
halleluja!!!
http://pastebin.com/QeqRx4S1
download it if you want.
Wow, thanks a lot. Nice feature!
Added it as an experimental feature for users with mobile devices