[OpenLayers-Users] my road styleMap not working

Arnd Wippermann arnd.wippermann at web.de
Fri Dec 11 17:18:19 EST 2009


Hi,
 
perhaps this works
 
var rType = {}; //new Object()

Arnd

 
  _____  

Von: users-bounces at openlayers.org [mailto:users-bounces at openlayers.org] Im
Auftrag von Haftish 21
Gesendet: Freitag, 11. Dezember 2009 12:52
An: users at openlayers.org
Betreff: [OpenLayers-Users] my road styleMap not working


Trying to define a styleMap of my road layer based on rdlnstattx attribute,
I defined a rule based on type as follows:

var rStyle = new OpenLayers.StyleMap();
var rType = new Array();
   
rType = {
        FUN: { text: 'Functioning', strokeColor:"#ff0000", strokeWidth: 7 },
        SCH: { text: 'Schematic road', strokeColor:"#0aa989", strokeWidth: 4
},
        COM: { text: 'Compiled road connector', strokeColor:"#f4a427",
strokeWidth: 3 }
        };

rStyle.addUniqueValueRules("default", 'rdlnstattx', rType);

But, nothing seems working. My styleMap on polygon layer is working well.
Where did I miss sth? Any clue???

Thank you in advance!!!

-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.osgeo.org/pipermail/openlayers-users/attachments/20091211/e9710bd8/attachment.html


More information about the Users mailing list