close ad
 
Important WebAssist Announcement
open ad
View Menu

Technical Support Forums

Free, outstanding support from WebAssist and your colleagues

rating

How to link to map location

Thread began 2/20/2012 10:27 am by Dennis | Last modified 3/02/2012 8:49 am by Dennis | 2285 views | 5 replies |

Dennis

How to link to map location

With the previous version of Pro Maps you supplied instructions for linking to a specific map location. Such as...

  <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>  


I could not get this to work with Pro Maps in WADE 1.0.1.

Is there a way to do this with 1.0.1?

Thanks,
Dennis

Sign in to reply to this post

Ray BorduinWebAssist

I just tried and it appears there are a couple of things that changed in v3 that prevent the current code from working.

I'll make a few updates and get out a fix for this issue in the next week to allow this to be added again.

The new syntax will be:
onclick="wagmp_map_1_obj.openWindowByAddress('8899 University Center Ln');"

We are working on a couple of other issues reported, so we should have a build out within a week.

Sign in to reply to this post
Did this help? Tips are appreciated...

Dennis

Thanks Ray.

Dennis

Sign in to reply to this post

Dennis

Thanks and a couple questions

The map links are working now with DE 1.0.2 (thanks).

One issue when multiple links are available, when subsequent links are clicked, the previous info windows remain displayed. It doesn’t take many links/clicks to clutter the map with info windows. Is there a way to have the previous info window close when a new link is clicked. This is the way the original Pro Maps worked.

Using a recordset, can I intermix using addresses and coordinates? I have one location that Google Maps doesn’t like the address. I tried entering the coordinates in the street address column, but the location is not displayed.

Also using a recordset, is there a way to define custom marker images.

For reference here is my map page: 2012_National.php#map

Thanks,
Dennis

Sign in to reply to this post

Ray BorduinWebAssist

I'll update the next version to automatically close info windows.

To update your current code you would have to change the include file wagmp_map_1.php

update the function:

function openWindowByAddressFunc(value,attname)  {
var point = this.getPointByAddress(value,attname);
point.infowindow.open(this.obj,point.marker);
}


to:

function openWindowByAddressFunc(value,attname)  {
var point = this.getPointByAddress(value,attname);
for (var x=0; x < this.infowindows.length; x++) {
this.infowindows[x].close();
}
point.infowindow.open(this.obj,point.marker);
}



and then you would have to update in the addMarker function:

google.maps.event.addListener(marker, 'click', function() {
infowindow.open(map1,marker);



to:

google.maps.event.addListener(marker, 'click', function() {
for (var x=0; x < wagmp_map_1_obj.infowindows.length; x++) {
wagmp_map_1_obj.infowindows[x].close();
}
infowindow.open(map1,marker);



Custom markers from the database isn't directly supported, but can be done by hand coding. Just update the code where the info window images are specified to be dynamic. There is no way to do that through the ui directly currently.

Sign in to reply to this post
Did this help? Tips are appreciated...

Dennis

Thanks Ray, your code suggestions work fine.

Dennis

Sign in to reply to this post

asnw0764437428

custom markers

In the old version of Pro Maps (Before design extender) I was able to add mine own custom graphic markers and if need be alter their sizes within the wagmp_map file and enter their dimensions with the Gsize option. In Designer Extender this part of the code is now missing.

How would I go about adding this part of the code back into the new version wagmp_map file so that custom markers will show and at their correct dimensions?

Sign in to reply to this post

Jason ByrnesWebAssist

in the map js file, the code to generate the icon images will look like this:

image: new google.maps.MarkerImage('plugins/webassist/google_javascript/images/traditionalflat_pacifica.png', new google.maps.Size(34,35), new google.maps.Point(0,0), new google.maps.Point(9,33)),




you can edit that to point to your custom images.

Sign in to reply to this post

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...