POST
|
Hello there, I am attempting to apply a HeatMap renderer to a dynamic layer I have created. The DynamicLayer contains a point query gathered from my ArcGIS Server SDE database. I have successfully implemented basic things such as SimpleRenderer to display the data on my map. However, whenever I attempt to use the same logic, but swap out the SimpleRenderer with HeatMapRenderer, I get errors. I am sure I am setting all parameters correctly as described in the Documentation Samples. I am getting the following error reply from my ArcGIS Server: ":"Invalid renderer specified for dynamic dataLayer with 'id': 0." My code is below: any help would be appreciated. var dndSource, layerLookup, dynamicLayerInfos; (function() { var layerName, dataSource, layerSource, options, drawingOptions; debugger; ///Testing Renderer var heatmapRenderer = new HeatmapRenderer({ blurRadius: 10, colorStops: [ { ratio: 0, color: "rgba(250, 0, 0, 0)" }, { ratio: 0.6, color: "rgb(250, 0, 0)" }, { ratio: 0.85, color: "rgb(250, 150, 0)" }, { ratio: 0.95, color: "rgb(255, 255, 0)" }], }); var m_renderer = heatmapRenderer; var m_queryDataSource = new QueryDataSource(); m_queryDataSource.workspaceId = biodWeb.const.gis.workSpaceID; m_queryDataSource.geometryType = "point"; m_queryDataSource.oidFields = ["OBJECTID"]; m_queryDataSource.query = "Select OBJECTID, Shape from bioDWEB.BD.NATEARTH_10M_POPULATED_PLACES"; m_queryDataSource.spatialReference = new SpatialReference({ wkid: 102100 }); m_queryDataSource.workspaceId = biodWeb.const.gis.workSpaceID; var layerSource = new LayerDataSource(); layerSource.dataSource = m_queryDataSource; //---------- Dynamic layer layerName = "add a new layer from database"; var usaLayer = new ArcGISDynamicMapServiceLayer("http://MYSERVER.COM/arcgis/rest/services/BiodWebDyn/BioD_DynamicMap/MapServer", { "id": "NEW LAYER" }); usaLayer.setVisibleLayers([0]); if (!dynamicLayerInfos) { dynamicLayerInfos = usaLayer.createDynamicLayerInfosFromLayerInfos(); } var dynamicLayerInfo = new DynamicLayerInfo(); dynamicLayerInfo.id = 0; dynamicLayerInfo.name = layerName; dynamicLayerInfo.source = layerSource; dynamicLayerInfos.push(dynamicLayerInfo); usaLayer.setDynamicLayerInfos(dynamicLayerInfos, true); drawingOptions = new LayerDrawingOptions(); drawingOptions.renderer = m_renderer; options = []; options[0] = drawingOptions; usaLayer.setLayerDrawingOptions(options); map.addLayer(usaLayer); })();
... View more
04-24-2015
06:14 AM
|
0
|
1
|
3875
|
POST
|
Hi there, I am in a situation where text symbols in the form of a graphic layer are randomly disappearing from my map when zooming in/out or changing extent. I can have multiple text labels on the same layer at once, but the behaviour does not seem to occur in unison between all labels - i.e. some will randomly disappear and reappear while others do not change. I am having trouble fixing this issue as it seems to be occurring randomly and I cannot seem to replicate it consistently. I have other graphics layers on my map (albeit not showing text symbols) that do not experience this behaviour. I am inclined to believe this may be an ESRI API issue but I cannot say for sure. I am wondering if anyone else has experienced this issue and if they found a solution. Any suggestions are welcome, I can post some code if it would be helpful.
... View more
10-17-2014
06:48 AM
|
0
|
0
|
579
|
Online Status |
Offline
|
Date Last Visited |
11-11-2020
02:23 AM
|