POST
|
This can be solved through the CSS class .esriLegendLeft .esriLegendLeft { padding-left: 0px; }
... View more
11-20-2013
10:48 AM
|
0
|
0
|
178
|
POST
|
For layers that are in group layers, their legend item is indented. Is there a way to align all of the legend items, regardless of whether they are in a group layer or not? [ATTACH=CONFIG]29245[/ATTACH]
... View more
11-20-2013
09:21 AM
|
0
|
1
|
594
|
POST
|
Marked--it was really 50/50 solution between the two of you (Jeff.pace and @Odoe). Without specifying the correct symbol the map wouldn't show the symbol and without inputting the correct spatial info the symbols would show but--in Africa--which I would have missed. Thank you both again! In addition to the marking the post as answered, you should also use the up arrows to show which posts were helpful. This will also reward Jeff's input.
... View more
11-15-2013
08:42 AM
|
0
|
0
|
333
|
POST
|
Are you using an IdentifyTask to get the features on a map click? If so, the IdentifyParameters has two properties that will control which sublayers will be returned. Use layerIds to set them manually or set layerOption to LAYER_OPTION_VISIBLE to only show the visible layers. I've used the TOC in my project and have no issue in getting only getting the features from the visible layers in a popup. I set the layerIds property to the layer's visibleLayers property on each map click map.on("click", executeIdentifyTask);
function executeIdentifyTask(evt) {
map.graphics.clear();
layerClickGraphic.clear();
layerResultsGraphic.clear();
identifyParams.geometry = evt.mapPoint;
identifyParams.mapExtent = map.extent;
identifyParams.layerIds = layerDynamic.visibleLayers;
layerClickGraphic.add(new esri.Graphic(evt.mapPoint, symbolClick));
identifyTask.execute(identifyParams, function (results) { populateTC(results, evt); });
}
... View more
11-15-2013
08:34 AM
|
0
|
0
|
749
|
POST
|
No, this was built pretty much from scratch a few years back that incorporates the TOC control developed by Tom Hill. And don't forget to mark the posts that helpful by clicking on the up arrow!
... View more
11-14-2013
05:59 AM
|
0
|
0
|
348
|
POST
|
In one of my projects, I run an IdentifyTask on the visible layers in a map service. The results from each layer are put into a grid on a separate tab. This is built on the fly, since the user has the ability to turn on different layers and since each layer has different attributes. Each grid has the event handlers added to them so that rolling over or clicking a cell will highlight the feature on the map. This is the code I use to build the tabs and insert them into the infoWindow.
protected function MainMap_mapClickHandler(event:MapMouseEvent):void
{
var identifyParams:IdentifyParameters = new IdentifyParameters();
var clickGraphic:Graphic = new Graphic(event.mapPoint, clickPointSymbol);
identifyParams.returnGeometry = true;
identifyParams.tolerance = 5;
identifyParams.width = MainMap.width;
identifyParams.height = MainMap.height;
identifyParams.geometry = event.mapPoint;
identifyParams.mapExtent = MainMap.extent;
identifyParams.spatialReference = MainMap.spatialReference;
identifyParams.layerIds = layerLIS.visibleLayers.source;
identifyParams.layerOption = IdentifyParameters.LAYER_OPTION_ALL;
clickGraphicsLayer.clear();
MainMap.infoWindow.hide();
graphicsLayer.clear();
cursorManager.setBusyCursor();
identifyTask.url = layerLIS.url;
identifyTask.execute(identifyParams, new AsyncResponder(resultFunction, faultFunction, clickGraphic));
function resultFunction(results:Array, clickGraphic:Graphic):void
{
var myInfoRenderer:InfoRenderer = new InfoRenderer;
var mapPoint:MapPoint = MapPoint(clickGraphic.geometry);
var point:Point = MainMap.toScreen(mapPoint);
if (results && results.length > 0)
{
var oldLayer:Number = -1;
var resultsArray:Array = [];
var result:IdentifyResult;
var resultGraphic:Graphic;
var tab:TabNavigator = new TabNavigator();
var newVBox:VBox = new VBox;
var newVBoxDG:VBox = new VBox;
var newText:Text = new Text;
var newDG:DataGrid = new DataGrid;
var graphic:Graphic;
clickGraphicsLayer.add(clickGraphic);
result = results[0];
oldLayer = result.layerId;
resultsArray.push(result.feature.attributes);
newText = new Text;
newText.text = result.layerName;
graphic = result.feature;
graphic.alpha = 0.3;
graphicsLayer.add(graphic);
tab.width = 400;
tab.height = 230;
for (var i:int = 1; i < results.length; i++)
{
result = results;
graphic = new Graphic;
graphic = result.feature;
graphic.alpha = 0.3;
graphicsLayer.add(graphic);
if (result.layerId == oldLayer)
{
resultsArray.push(result.feature.attributes);
}
else
{
newDG = new DataGrid;
newVBox = new VBox;
newDG.dataProvider = resultsArray;
if (!(result.feature.attributes.source == undefined))
{
for each (var dgCol:DataGridColumn in newDG.columns)
{
if (dgCol.dataField == "Source")
{
dgCol.itemRenderer = new ClassFactory(HyperLinkField);
}
}
}
newDG.addEventListener(ListEvent.ITEM_CLICK, newDG_ItemRollOver, false, 0, true);
newDG.addEventListener(ListEvent.ITEM_ROLL_OUT, newDG_ItemRollOut, false, 0 ,true);
newDG.addEventListener(ListEvent.ITEM_ROLL_OVER, newDG_ItemRollOver, false, 0, true);
newVBox.addElement(newText);
newVBox.addElement(newDG);
// newVBox.addElement(newVBoxDG);
newVBox.label = oldLayer.toString();
newVBox.label = oldLayer.toString();
tab.addElement(newVBox);
myInfoRenderer.addElement(tab);
newText = new Text;
newText.text = result.layerName;
resultsArray = [];
resultsArray.push(result.feature.attributes);
}
oldLayer = result.layerId;
}
newVBox = new VBox;
newVBoxDG = new VBox;
newDG = new DataGrid;
newDG.addEventListener(ListEvent.ITEM_CLICK, newDG_ItemRollOver, false, 0, true);
newDG.addEventListener(ListEvent.ITEM_ROLL_OUT, newDG_ItemRollOut, false, 0, true);
newDG.addEventListener(ListEvent.ITEM_ROLL_OVER, newDG_ItemRollOver, false, 0, true);
newVBox.addElement(newText);
newDG.dataProvider = resultsArray;
if (!(results[0].feature.attributes.Source == undefined))
{
for each (var dgCol:DataGridColumn in newDG.columns)
{
if (dgCol.dataField == "Source")
{
dgCol.itemRenderer = new ClassFactory(HyperLinkField);
}
}
}
newVBox.addElement(newDG);
// newVBoxDG.addElement(newDG);
// newVBox.addElement(newVBoxDG);
newVBox.label = oldLayer.toString();
tab.addElement(newVBox);
myInfoRenderer.addElement(tab);
cursorManager.removeBusyCursor();
MainMap.infoWindow.content = myInfoRenderer;
MainMap.infoWindow.label = "Results";
MainMap.infoWindow.show(MainMap.toMap(point));
MainMap.infoWindow.addEventListener(Event.CLOSE, infoWindow_Close, false, 0, true);
}
}
}
... View more
11-14-2013
04:54 AM
|
0
|
0
|
348
|
POST
|
Have you tried initialize the attribute editor in the populateListDocs function, after the store is built, instead of in the onLayersAddResult function?
... View more
11-13-2013
11:18 AM
|
0
|
0
|
509
|
POST
|
Esri's story maps might be a way to solve your problem. There are several templates that make it pretty easy to set up. The Storytelling Playlist uses an ArcGIS Online map, which is created by ingesting a .csv file. You can configure the popup to show the attributes you want to display. Although it doesn't zoom into the point when you click on it, that may not be difficult to add to the code.
... View more
11-07-2013
09:27 AM
|
0
|
0
|
253
|
POST
|
The IEditor has a SelectionCount property, also This property returns the Map's total number of selected features belonging to editable layers.
... View more
11-07-2013
04:57 AM
|
0
|
0
|
213
|
POST
|
I didn't need to look for particular feature, so I never played around with Array.FindIndex
... View more
11-06-2013
10:52 AM
|
0
|
0
|
255
|
POST
|
You could use the OpenFileDialog and specify the file type
... View more
11-06-2013
07:26 AM
|
0
|
0
|
350
|
POST
|
Yes, you should be able to execute any tool in the Geoprocessing toolbox like that. I've always used the syntax used in the "Executing a system tool with managed assembly" section. However, I'm surprised that the GPXToFeature tool isn't in the ArcObjects API reference (like this one for FeatureToRaster). Then again, none of the toolboxes after DataManagementTools are showing up, either.
... View more
11-06-2013
07:01 AM
|
0
|
0
|
350
|
POST
|
You could put the features into a collection (an array, dictionary, hashtable, etc). After running the feature cursor once to build the collection, you can access the features as you need. One of my projects involved doing a series of calculations on the attributes of a group of features. Many of the calculations used values that were the result of previous calculations. The person who originally wrote the code used a separate cursor for each individual calculation, which took forever. I was able to rewrite the code where all of the attributes for the features where written into an array using a featurecursor. All the calculations where then done by looping through this array, which speed things up immensely.
... View more
11-06-2013
06:22 AM
|
0
|
0
|
255
|
POST
|
I've been able to remove the group name and title from my legend, leaving only the swatches and labels using the CSS .esriLegendLayerLabel { visibility: hidden; } However, this leaves me with a large empty space above the legend. How would I remove that in addition? [ATTACH=CONFIG]28880[/ATTACH]
... View more
11-05-2013
11:14 AM
|
0
|
3
|
838
|
Title | Kudos | Posted |
---|---|---|
2 | Friday | |
1 | Friday | |
1 | Tuesday | |
1 | Tuesday | |
1 | 11-06-2023 09:43 AM |
Online Status |
Online
|
Date Last Visited |
a minute ago
|