Style manager configuration in openlayers 3

المشرف العام

Administrator
طاقم الإدارة
I am trying to the style from configuration and return My code is like this.

qt = {}; qt.gpn = qt.gpn || {}; qt.gpn.StyleManager = function(opts) { this.styleConfig = { Polygon: { layerStyle: function(feature, resolution) { OpenLayer3 Style }, legendText: [{ strokeWidth: , storkeColor: , fillColor: , displayText: }, { strokeWidth: , storkeColor: , fillColor: , displayText: }] }, Line: { layerStyle: function(feature, resolution) { openLayer3 Style }, legendText: [{ strokeWidth: , storkeColor: , fillColor: , displayText: }, { strokeWidth: , storkeColor: , fillColor: , displayText: }] } }; }; qt.gpn.StyleManager.prototype.getLayerStyle = function(layerId) { get it from config and return the style }; I want to create a method to get the style from styleConfig for the given layer id and return style in javascript. Can someone help me



أكثر...
 
أعلى