close ad
WARNING PC USERS: Do Not Install the DREAMWEAVER CC 2017 Update »
open ad
View Menu

Technical Support Forums

Free, outstanding support from WebAssist and your colleagues

rating

address marker :: can it be set up to not display on the page by default?

Thread began 12/29/2009 3:34 pm by sandy170299 | Last modified 2/09/2010 3:24 pm by Jimmy Wu | 2481 views | 14 replies |

sandy170299

address marker :: can it be set up to not display on the page by default?

Can I change a setting to NOT have the address market show when the page loads? Also, instead of clicking on a marker to display the data, can it be set up to show the marker when you mouse-over a location?

Sign in to reply to this post

Jimmy Wu

For each of the markers in wagmp_map_<mapnum>.php, you will want to find this code:

GEvent.addListener(marker_0, 'click', function() {
marker_0.openInfoWindowHtml(address_0.infowindowtext);
});

and change the click to mouseover, so it looks like this:

GEvent.addListener(marker_0, 'mouseover', function() {
marker_0.openInfoWindowHtml(address_0.infowindowtext);
});

After that, you will want to add another event listener to close the window on mouseout (if that is the functionality you want).
GEvent.addListener(marker_0, 'mouseout', function() {
marker_0.closeInfoWindow();
});


To prevent the info window from popping up on default, you will have to find the code similar to this for each marker and remove it:
if('address_0' == 'address_0')
marker_0.openInfoWindowHtml(address_0.infowindowtext);

Sign in to reply to this post

sandy170299

Jimmy, I don't have this code. It's dynamic, so the closest I have is:

if (point && !isNaN(latitude)) {
wagmp_map_1_obj.addressFailed = false;
var marker_0_<?php echo $getListing_id; ?> = new GMarker(point, icon_0);
GEvent.addListener(marker_0_<?php echo $getListing_id; ?>, 'mouseover', function() {
marker_0_<?php echo $getListing_id; ?>.openInfoWindowHtml(address_0_<?php echo $getListing_id; ?>.infowindowtext);
});

Is this the right code to change?

Sign in to reply to this post

sandy170299

Jimmy, I'm attaching my code.

Attached Files
wa.txt
Sign in to reply to this post

Jimmy Wu

You would be removing this code to get the window from not popping up initially:
if('address_0_<?php echo $getListing_id; ?>' == 'address_0_0')
marker_0_<?php echo $getListing_id; ?>.openInfoWindowHtml(address_0_<?php echo $getListing_id; ?>.infowindowtext);

And this is the code that you would use for changing the mouseover:
GEvent.addListener(marker_0_<?php echo $getListing_id; ?>, 'click', function() {
marker_0_<?php echo $getListing_id; ?>.openInfoWindowHtml(address_0_<?php echo $getListing_id; ?>.infowindowtext);
});

Change the click to mouseover:
GEvent.addListener(marker_0_<?php echo $getListing_id; ?>, 'mouseover', function() {
marker_0_<?php echo $getListing_id; ?>.openInfoWindowHtml(address_0_<?php echo $getListing_id; ?>.infowindowtext);
});

To add the mouseout:
GEvent.addListener(marker_0_<?php echo $getListing_id; ?>, 'mouseout', function() {
marker_0_<?php echo $getListing_id; ?>.closeInfoWindow();
});

Sign in to reply to this post

sandy170299

Works perfectly, Jimmy. Thank you! Can this be a feature that is added to the next version of this extension? That would rock!

Sign in to reply to this post

Jimmy Wu

I will put in a feature request for this and it may be added into a future release.

Sign in to reply to this post

sandy170299

I'm also requesting the ability to add a default zoom level through the wizard because every time I go into the wizard to change something, it deletes the info I entered about the zoom level.

Thanks!

Sign in to reply to this post

Jimmy Wu

If you could make a thread to request that in the wishlist forum, it will be looked over.

If you run into any additional issue, feel free to open a new thread.

Sign in to reply to this post

sandy170299

Jimmy, this stopped working again after I edited a map. Here is the page:

canadian-hunting.php

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