Tag Info

Hot answers tagged

4

The styles are normally saved in public.layer_styles. Being in the public schema it should be accessible to every user. If not, make sure it becomes using: GRANT SELECT ON TABLE public.layer_styles TO users; -- "users" is a group with all your #normal users


2

One idea would be to hide the WMSLayer entirely if the map's extent is outside the layers "valid" extent. Based on this answer, one could listen to the map's extent-change event and check if the map's current extent is acceptable: map.on("extent-change", function () { // Check if map.extent is acceptable, otherwise hide the WMSLayer. if ...


2

Yes, that is possible: rel = QgsRelation() rel.setReferencingLayer( 'child_layer_id' ) rel.setReferencedLayer( 'parent_layer_id' ) rel.addFieldPair( 'fk_field', 'pk_field' ) rel.setRelationId( 'my_relation' ) rel.setRelationName( 'Related Features' ) # rel.isValid() # It will only be added if it is valid. If not, check the ids and field names ...


1

Found a link which contained solutions to adding 2 layers or more: http://stackoverflow.com/questions/1769648/addition-with-null-values Basic gist is when using 2 columns: coalesce("Column_1"+"Column_2","Column_1","Column_2") Using 3 columns or more, I used: coalesce("Column_1",0.00) + coalesce("Column_2",0.00) + coalesce("Column_3",0.00) + ....... ...


1

Code looks OK to me so I guess its down to formatting of the string especially with "\" or "/" or "\\" . This line: lyr1 = arcpy.mapping.Layer("C:\ArcGis\Aerial_Imagery.lyr") should really be: lyr1 = arcpy.mapping.Layer(r"C:\ArcGis\Aerial_Imagery.lyr") or it could be: lyr1 = arcpy.mapping.Layer("C:\\ArcGis\\Aerial_Imagery.lyr") So the full path ...


1

private void Button_Click(object sender, RoutedEventArgs e) { int i = myMap.Layers.Count; ArcGISDynamicMapServiceLayer dynLayer = myMap.Layers[0] as ArcGISDynamicMapServiceLayer; List<string> plist = new List<string>(); foreach(LayerInfo layerinfo in dynLayer.Layers) { ...



Only top voted, non community-wiki answers of a minimum length are eligible