You keep challenging me with this stuff Chris!!
Just so happens I wanted this functionality as well so now I've figured out a way to make it work for you. For me, it'll be a little more difficult to implement and I have to think a little bit harder. That and the fact I don't really know Javascript will have me head-scratching for a little longer methinks
OK, so this procedure will only work properly if you only have one datapoint to plot. If you have more, only the last plot rendered will display the Info Window, the others will just be normal points. Be advised, this involves changing one of the Javascript files on your site. If the map module is updated in the future, this change will almost certainly be overwritten and you'll need to re-apply the code below.
Also, I caveat this with the normal warning. I am by no means an expert and have applied limited testing to this code. It works on my system and in my environment with a single point map and a multi point map (with the limitation mentioned above), but by using this technique you accept responsibility for any consequences to your systems.
With that out of the way, here is the code change that I made:
- Locate and edit the DesktopModules/Map/Visuals/Google.Standard.js file.
- Find the line that begins function Map_PlotPoint - in my copy, this is line number 156.
- Within that function, find the line if (currentMarker!=null) - in my copy, on line 201
- Under the eval statement within this code block, add a new line with the following code: currentMarker.openInfoWindowHtml(description);
- Save the file
- Load (or re-load) your map page and you should see the info window displayed. This is in view mode, not Edit Map mode.
My problem is that I have a map that will be used to display all of the businesses on my site, but I also want to use the same map to display just a single point if the user just wants to find one business. I therefore need some mechanism for passing a parameter to the Javascript to set the pop-up behaviour. If anyone else can help me to implement this, I'd appreciate it! Also, if anyone else can suggest a more elegant way of achieving the same results, there's at least two of us here who would love to hear from you.
As before Chris, can you please let me know if it works for you!