Posted by Summitt Dweller on April 3, 2011 at 4:48pm
I've got a new site that's using the D6 GMap module along with Location. It does a nice job of showing me locations of users and nodes, thus far. However, I'd like to show the location of an event (this event is the subject of the entire website) on ALL the GMap's I generate whether for users, nodes, whatever. I only dabble in javascript enough to know that I can add the marker I want using something like this:
map.addOverlay(new GMarker(GLatLng(40.86997,-92.91825)); // my addition
But where can I put this to add a marker to EVERY GMap the site displays? Or, is there another way to achieve this same effect?
Thanks in advance for any advice you can offer!
Mark

Comments
script.js
Have you tried creating (or adding to) script.js in your main theme folder? That can add javascript to every page. Another choice that's a bit janky is to create a user/node for the event so it shows on all pages. Finally, instead of using the pregenerated maps, you could use Views to create your own map. Just select the display as a GMap, and then you can control anything you want. Create the user page and then add the event.
Hope that helps.
Views It Is
I think I will try it with a new View. My Nodes map might never contain anything meaningful anyway so no harm in replacing the Nodes and Users maps with a custom map for users and anything else that deserves to be mapped. Thanks for the suggestion!
Mark