コード例 #1
0
 /// <summary>
 /// Constructor for LayerGeoJson with WMS Type
 /// </summary>
 public LayerGeoJson(string layerName, string mapServerUrl, string mapServerLayerName, string layerColor, decimal layerOpacity, LayerInitialVisibility layerInitialVisibility)
 {
     LayerName = layerName;
     MapServerUrl = mapServerUrl;
     MapServerLayerName = mapServerLayerName;
     LayerColor = layerColor;
     LayerOpacity = layerOpacity;
     LayerInitialVisibility = layerInitialVisibility;
     LayerType = LayerGeoJsonType.Wms;
 }
コード例 #2
0
 /// <summary>
 /// Constructor for LayerGeoJson with Vector Type
 /// </summary>
 public LayerGeoJson(string layerName, FeatureCollection geoJsonFeatureCollection, string layerColor, decimal layerOpacity, LayerInitialVisibility layerInitialVisibility)
 {
     LayerName = layerName;
     GeoJsonFeatureCollection = geoJsonFeatureCollection;
     LayerColor = layerColor.StartsWith("#") ? layerColor : GetColorString(layerColor);
     LayerOpacity = layerOpacity;
     LayerInitialVisibility = layerInitialVisibility;
     LayerType = LayerGeoJsonType.Vector;
     HasCustomPopups = geoJsonFeatureCollection.Features.Any(x => x.Properties.ContainsKey("PopupUrl"));
 }