def nonPointLayer(layer, safeLayerName, usedFields, json, wfsLayers): if layer.providerType() == 'WFS' and json is False: new_obj, scriptTag = buildNonPointWFS(safeLayerName, layer) wfsLayers += wfsScript(scriptTag) else: attrText = layer.attribution() attrUrl = layer.attributionUrl() layerAttr = '<a href="%s">%s</a>' % (attrUrl, attrText) new_obj = buildNonPointJSON(safeLayerName, usedFields, layerAttr) return new_obj, wfsLayers
def nonPointLayer(layer, safeLayerName, usedFields, json, wfsLayers, symbol, useMultiStyle): if layer.providerType() == 'WFS' and json is False: (new_obj, scriptTag, useMultiStyle) = buildNonPointWFS(safeLayerName, layer, symbol, useMultiStyle) wfsLayers += wfsScript(scriptTag) else: attrText = layer.attribution().replace('\n', ' ').replace('\r', ' ') attrUrl = layer.attributionUrl() layerAttr = u'<a href="%s">%s</a>' % (attrUrl, attrText) new_obj, useMultiStyle = buildNonPointJSON(safeLayerName, usedFields, layerAttr, symbol, useMultiStyle) return new_obj, wfsLayers, useMultiStyle
def pointLayer(layer, safeLayerName, labeltext, cluster, usedFields, json, wfsLayers, markerType, symbol): if layer.providerType() == 'WFS' and json is False: p2lf = pointToLayerFunction(safeLayerName, labeltext, symbol) (new_obj, scriptTag) = buildPointWFS(p2lf, safeLayerName, layer, cluster) wfsLayers += wfsScript(scriptTag) else: attrText = layer.attribution() attrUrl = layer.attributionUrl() layerAttr = '<a href="%s">%s</a>' % (attrUrl, attrText) new_obj = buildPointJSON(safeLayerName, labeltext, usedFields, markerType, layerAttr) if cluster: new_obj += clusterScript(safeLayerName) return new_obj, wfsLayers
def pointLayer(layer, safeLayerName, cluster, usedFields, json, wfsLayers, markerType, symbol, useMultiStyle): if layer.providerType() == 'WFS' and json is False: p2lf = "" for sl in xrange(symbol.symbolLayerCount()): p2lf += pointToLayerFunction(safeLayerName, symbol, sl) (new_obj, scriptTag, useMultiStyle) = buildPointWFS(p2lf, safeLayerName, layer, cluster, symbol, useMultiStyle) wfsLayers += wfsScript(scriptTag) else: attrText = layer.attribution() attrUrl = layer.attributionUrl() layerAttr = '<a href="%s">%s</a>' % (attrUrl, attrText) (new_obj, useMultiStyle) = buildPointJSON(symbol, safeLayerName, usedFields, markerType, layerAttr, useMultiStyle) if cluster: new_obj += clusterScript(safeLayerName) return new_obj, wfsLayers, useMultiStyle