Tag Info

New answers tagged

1

Starting from the custom example from the github repo, modify the iconCreateFunction to add a different css class based on the size of the cluster: iconCreateFunction: function (cluster) { var markers = cluster.getAllChildMarkers(); var n = 0; for (var i = 0; i < markers.length; i++) { n += markers[i].number; } var small = n < 200; var ...


0

Ok, it seems the "icon" in my text file was not interpreted as an attribute at all, but as an externalGraphics link. Logical off course, I just didn't get it. So now I'm able to access my icons with: function hideFeatures() { var feature = pois.features; for( var i = 0; i < feature.length; i++ ) { if (feature[i].style.externalGraphic ...


0

You can use an attribute form the feature to determine if the feature should be visible. I haven't tested it, but i think this should work: $.each(pois.features, function (index, feature) { if ( feature.attributes.description == 'UV-foto' ) feature.style.display = 'none'; });



Top 50 recent answers are included