close ad
Databridge V2 with MySQLi support IS Now Available!
open ad
View Menu

Technical Support Forums

Free, outstanding support from WebAssist and your colleagues

rating

Links not working

Thread began 7/08/2011 3:19 pm by dennis350132 | Last modified 8/07/2012 5:24 pm by Jason Byrnes | 1804 views | 11 replies |

dennis350132

Links not working

Hello, I have followed the PDF tutorial on how to add links to
locations within the map, but am having issues. The links only add the
# to the URL. I am working on a very old website which I didn't build
and am very frustrated. I'm not sure what else I can do. I set the
zoom to 10 but it seems to change on some reloads. Can anyone help me?
This was supposed to be a couple house job and is a giant headache.
Thanks for any help!

The link is FarmersMarketsTest1.html

<a href="#" onClick="wagmp_map_8_obj.getPointByAddress ('Broadway at
Battery Place, Manhattan, NY').marker.openInfoWindowHtml
(wagmp_map_8_obj.getPointByAddress('Broadway at Battery Place,
Manhattan, NY').address.infowindowtext);">Broadway at Battery Place,
Manhattan, NY</a>

Sign in to reply to this post

Jason ByrnesWebAssist

your link should only pass the street address for the marker.

looking in the map js, the code of the Broadway at Battery Place marker is:

var address_2 = {
street: 'Broadway at Battery Place',
city: 'Manhattan',
state: 'NY',
zip: '10004',
country: 'USA',
infowindow: 'default',
infowindowtext: '<span style="font: 12px Verdana, Arial, Helvetica, sans-serif; color: black;"><strong>Address:</strong><br />Broadway at Battery Place<br />Manhattan, NY 10004 USA</span>',
full: 'Broadway at Battery Place, Manhattan, NY, 10004, USA',
isdefault: false,
addressType: 'address',
loop: '',
latitude: '',
longitude: '',
markerStyle: 'Google Traditional (flat)',
markerColor: 'Desert Spice'
};


the link should only pass the street:
street: 'Broadway at Battery Place',

so the link should be:
<a href="#" onClick="wagmp_map_8_obj.getPointByAddress ('Broadway at
Battery Place').marker.openInfoWindowHtml
(wagmp_map_8_obj.getPointByAddress('Broadway at Battery Place').address.infowindowtext);">Broadway at Battery Place,
Manhattan, NY</a>

Sign in to reply to this post

dennis350132

Thanks!

Thanks so much Jason, that worked perfectly. I wish the PDF had mentioned that information. I would have been past this HOURS ago. I guess I should have taken the "street address" instruction literally. Thanks again!

Sign in to reply to this post

Jason ByrnesWebAssist

it does mention this in step 5:

  Replace the two locations where Address is bolded to reference the
street address for the marker location you wish the link to focus on.
Example: If the location I wanted my map to focus on was 8899
University Center Ln, this text would look as follows.
<a href="#" onClick="wagmp_map_1_obj.getPointByAddress
('8899 University Center Ln').marker.openInfoWindowHtml
(wagmp_map_1_obj.getPointByAddress('8899 University Center
Ln').address.infowindowtext);">8899 University Center Ln
</a>  



even the example only shows the street address.

Sign in to reply to this post

dennis350132

Some work, some do not

Hi Jason, only about half the links on that page function correctly. For instance, the very first link doesn't work, but I copied what was input under "street" exactly from the javascript file. Can you see anything wrong with the broken links? Again, I appreciate the help. I was supposed to have this done hours ago. Thanks.

Sign in to reply to this post

Jason ByrnesWebAssist

the links that are not working are because the Google geocoder is failing address lookup for those addresses. the links dont work because those address markers are not being added to the map.

the Google geocoder is not able to find the address for:
957 Route 5 & 20, Geneva, NY, 14456, USA

Sign in to reply to this post

theorytl401135

I tried following the tutorial and it did not work. I'm using the latest extensions and CS6 so I don't know if that may have any affect? I also noticed that the code line numbers in the tutorial do not match the code line numbers in the my files.

This is my modified link:

<?php $address_link = $row_events['address']; ?>
<a href="#event_more_info" class="moreInfo" onClick="wagmp_map_1_obj.getPointByAddress ('<?php echo $address_link;?>').marker.openInfoWindowHtml (wagmp_map_1_obj.getPointByAddress('<?php echo $address_link;?>').address.infowindowtext);"><strong>+more information</strong></a>

Here is a link to the page:

davefrackenpohl.com/calendar/test.php

Sign in to reply to this post

Jason ByrnesWebAssist

try using this instead:




<?php $address_link = $row_events['address']; ?>
<a href="#event_more_info" class="moreInfo" onClick="wagmp_map_1_obj.openWindowByAddress('<?php echo $address_link; ?>');"><strong>+more information</strong></a>

Sign in to reply to this post

theorytl401135

Hey Jason,

tried your suggestion but I am getting the same outcome. The map is not focusing and recenter on the marker after I click the link.

Sign in to reply to this post

Jason ByrnesWebAssist

in the webassist/google_javascript/wagmp_map_1.php file edit the following line:

function WAMapPoint(theMarker, theAddress, theIcon, point, map) {



to:

function WAMapPoint(theMarker, theAddress, theIcon, theInfoWindow, point, map) {



and this line:

return WAMapPoint(this.markers[x],this.addresses[x],this.icons[ x], this.points[x], this.obj);



to:

return WAMapPoint(this.markers[x],this.addresses[x],this.icons[x], this.infowindows[x], this.points[x], this.obj);



I think you may have an older version of Design Extender that is causing the incorrect code, The current version is 1.1.0. if you have a previous version, make sure to uninstall it from the extension manager before installing the newer one.

Sign in to reply to this post
loading

Build websites with a little help from your friends

Your friends over here at WebAssist! These Dreamweaver extensions will assist you in building unlimited, custom websites.

Build websites from already-built web applications

These out-of-the-box solutions provide you proven, tested applications that can be up and running now.  Build a store, a gallery, or a web-based email solution.

Want your website pre-built and hosted?

Close Windowclose

Rate your experience or provide feedback on this page

Account or customer service questions?
Please user our contact form.

Need technical support?
Please visit support to ask a question

Content

rating

Layout

rating

Ease of use

rating

security code refresh image

We do not respond to comments submitted from this page directly, but we do read and analyze any feedback and will use it to help make your experience better in the future.

Close Windowclose

We were unable to retrieve the attached file

Close Windowclose

Attach and remove files

add attachmentAdd attachment
Close Windowclose

Enter the URL you would like to link to in your post

Close Windowclose

This is how you use right click RTF editing

Enable right click RTF editing option allows you to add html markup into your tutorial such as images, bulleted lists, files and more...

-- click to close --

Uploading file...