0

a signGroup can now have an optional icon URL

This commit is contained in:
Andrew Chin
2011-01-21 21:11:39 -05:00
parent f866d5e654
commit 3db1953303
2 changed files with 7 additions and 1 deletions

View File

@@ -19,12 +19,14 @@
*
* Optional:
* checked : boolean. Set to true to have the group visible by default
* icon : string. Used to specify an icon url.
*/
var signGroups = [
// {label: "'To'", checked: false, match: function(s) {return s.msg.match(/to/)}},
// {label: "Storage", match: function(s) {return s.msg.match(/storage/i) || s.msg.match(/dirt/i) || s.msg.match(/sand/)}},
// {label: "Below Sealevel", match: function(s) { return s.y<64;}},
{label: "All", match: function(s) {return true}}
// {label: "Info", match: function(s) { return s.msg.match("\\[info\\]");}, icon:"http://google-maps-icons.googlecode.com/files/info.png"},
{label: "All", match: function(s) {return true}},
];
/* mapTypeData -- a list of alternate map renderings available. At least one rendering must be

View File

@@ -184,6 +184,10 @@ function initMarkers() {
if (item.type == 'sign') { iconURL = 'signpost_icon.png';}
console.log(signGroup.icon);
if (signGroup.icon) { iconURL = signGroup.icon;
}
var converted = fromWorldToLatLng(item.x, item.y, item.z);
var marker = new google.maps.Marker({position: converted,
map: map,