AW: [OpenLayers-Users] Changing style based on feature attributes.

kapuch kapusta.marcin at gmail.com
Fri Jul 8 06:23:48 EDT 2011


Your example give me an Idea what was wrong with my examples all the time.

My callback function in context was returning for externalGraphic null.
This is making errors.

But your example return empty string ("") not null:
icon: function(feature) {
  var icon = "";
  if (feature.cluster)
  {
    icon = "../img/marker.png";
  }
  return icon;
},

So the problem was with null returned from callback. Thank You very much...




-----
eDojazd.pl 
Niższe koszty dojazdów dla wszystkich i wszędzie!
--
View this message in context: http://osgeo-org.1803224.n2.nabble.com/Changing-style-based-on-feature-attributes-tp6558275p6562011.html
Sent from the OpenLayers Users mailing list archive at Nabble.com.


More information about the Users mailing list