« Theme the alpha site | Main | Multiple search boxes »

March 02, 2010

Google maps notes

Here are notes on creating a block view of a gmap that shows only the research site being viewed. It uses the same view used to create the research site map I outlined a while ago.

Basically:

1) Edit the view
2) add a block view
3) Add an argument:
Provide default argument > Node ID from URL
Action to take if argument does not validate: Display all values
- The last step is important because it allows all of the sites to show up when you go to view the main map. Otherwise the node NID argument for the Map view fails and nothing appears

4) The last step will be to add a bit of php to the administer > blocks > research site section. This will mimic the biblio block I created earlier and will ensure that the map only shows up when someone is viewing a research site.


Other notes. These sites look cool:

Something about Views inheriting arguments, didn't follow up on this but it may be useful in the future: http://drupal.org/node/349739

Tutorial on customizing gmaps, nice links to live websites that showcase legend and staggered loading of markers, code included: http://www.anelloconsulting.com/custom_gmap_solution_dynamically_updated_markers_part_2

Posted by kkwaiser at March 2, 2010 09:32 AM

Comments

Login to leave a comment. Create a new account.