$(document).ready(function() { $('#showmap').click(function(e) { e.preventDefault(); $('.archive-map').slideToggle("slow"); var text = document.getElementById('showmap').innerHTML ; if(text == "Show Map"){ document.getElementById('showmap').innerHTML = "Close Map" }else{ document.getElementById('showmap').innerHTML = "Show Map"; } }); /////////////////////// MAP //////////////////////////////// function createMarker(point, label) { // Create a lettered icon for this point using our icon class cafeIcon.image = "http://www.trackpacking.com/images/assets/gmaps/flag_destination.png"; // Set up our GMarkerOptions object markerOptions = { icon:cafeIcon }; var marker = new GMarker(point, markerOptions); GEvent.addListener(marker, "mouseover", function() { marker.openInfoWindowHtml(label); }); return marker; } var gmarkers = []; var gpoints = []; var htmls = []; var i = 1; var cafeIcon = new GIcon(G_DEFAULT_ICON); cafeIcon.iconSize = new GSize(25, 30); cafeIcon.shadowSize = new GSize(22, 20); cafeIcon.iconAnchor = new GPoint(15, 20); cafeIcon.infoWindowAnchor = new GPoint(12, 15); // Set up our GMarkerOptions object literal var m = document.getElementById("map"); m.style.height = "400px"; m.style.width = "605px"; var map = new GMap2(document.getElementById("map")); var bounds = new GLatLngBounds(); map.enableDoubleClickZoom(); map.enableScrollWheelZoom(); map.enableContinuousZoom(); map.setMapType(G_HYBRID_MAP); map.addControl(new GSmallMapControl()); map.addControl(new GMenuMapTypeControl(true,false)); var mt = map.getMapTypes(); for (var i=0; i