To see problem with filter tag/value on page reload:
1. Demo: google-maps-jquery-filtering.html
2. Select a tag-filter other than All
3. Reload the page --> All new markers/locations are generated and shown but
the selector still says what the last selection was, not All
One way to fix, in html add id="all":
<option value="all" id="all"> All</option>
At end of gmap creation:
document.getElementById("all").selected=true;
To enhance look and feel of icons: 1) replace javascript with this block:
var tag = "Wifi";
var icon = new google.maps.MarkerImage('images/wifi.png');
for ( i = 0; i < 40; i++ ) {
if ( i > 10 ) { tag = "Snowboarding"; icon = new google.maps.MarkerImage('images/snowboarding.png');}
if ( i > 20 ) { tag = "Music"; icon = new google.maps.MarkerImage('images/music.png');}
if ( i > 30 ) { tag = "Dancing"; icon = new google.maps.MarkerImage('images/dancing.png');}
$('#map_canvas').gmap('addMarker', { 'tag':tag, 'title':tag, 'bound':false, 'icon': icon, 'position': new google.maps.LatLng(southWest.lat() + latSpan * Math.random(), southWest.lng() + lngSpan * Math.random()) } );
}
2) Put attached 4 icons in demos/images/
(images from http://code.google.com/p/google-maps-icons/ )
Original issue reported on code.google.com by libby.ba...@gmail.com on 24 May 2011 at 9:20
Original issue reported on code.google.com by
libby.ba...@gmail.com
on 24 May 2011 at 9:20Attachments: