|
POST
|
If you're using "map.addLayer", the event "layer-add-result" is fired. When you use "map.addLayers", the event "layers-add-result" is fired
... View more
12-02-2013
06:48 AM
|
2
|
0
|
1424
|
|
POST
|
Same behavior in Chrome 30.0.1599.101 - any update on the timing for this fix? At this point I am forced to remove the fixed zoom functions from my applications. John H. This isn't happening on Chrome 31.0.1650.57. The marquee rectangle does appear on Zoom In and Zoom Out
... View more
11-29-2013
04:33 AM
|
0
|
0
|
1696
|
|
POST
|
This is how I've set up one of my applications. I have one code base that runs several different projects, with each project using the same URL but with a separate parameter at the end. http://maps.coastalscience.noaa.gov/biomapper/biomapper.html?id=BUIS http://maps.coastalscience.noaa.gov/biomapper/biomapper.html?id=StJohn The app uses the parameter to get the information from the XML configuration file to add the different map layers needed for the project (as well as the text in all the information dialogs). Through this configuration file, I can change from our development to production server merely by changing the service node in the XML file without recompiling the swf. I read the configuration file in my init function like this private function init():void
{
var xmlLoader:URLLoader = new URLLoader();
xmlLoader.addEventListener(Event.COMPLETE,init_onComplete);
xmlLoader.addEventListener(IOErrorEvent.IO_ERROR,test);
xmlLoader.load(new URLRequest("parameters.xml")); //this is the configuration file
and start using it like this
private function init_onComplete(event:Event):void
{
var params:Object;
var baseImagery:String;
var layerBaseImagery:ArcGISTiledMapServiceLayer = new ArcGISTiledMapServiceLayer;
try
{
var loader:URLLoader = URLLoader(event.target);
xmlParameters = new XML(loader.data);
params = getURLParameters();
if (params["id"])
{
input = params.id
}
else
{
Alert.show("Parameter search failed");
return;
}
xmlProjectParameters = xmlParameters.project.(@urlinput==input);
var bm:IBrowserManager = BrowserManager.getInstance();
bm.init("", xmlProjectParameters.@id + " BIOMapper");
///etc.
}
private function getURLParameters():Object
{
var result:URLVariables = new URLVariables();
try
{
if (ExternalInterface.available)
{
var search:String = ExternalInterface.call("location.search.substring", 1);
if (search && search.length > 0)
{
result.decode(search);
}
}
}
catch (error:Error)
{
Alert.show(error.toString());
}
return result;
}
Through configuration file, I load dynamic or tiled layers
baseImagery = xmlProjectParameters.baseimagery;
layerBaseImagery.url = serverName + baseImagery + "/MapServer";
mainMap.addLayer(layerBaseImagery);
This is what the configuration file looks like
<?xml version="1.0" encoding="utf-8"?>
<projects>
<project id="Buck Island" urlinput="BUIS">
<projectname name="Buck Island, USVI" pdftitle="Buck Island, USVI: Shallow-Depth Benthic Habitats" url="http://ccma.nos.noaa.gov/ecosystems/coralreef/stcroix.aspx" projectyear="2011"/>
<service>http://egisws02.nos.noaa.gov/ArcGIS/rest/services/biomapper/BUIS_</service>
<baseimagery>Imagery</baseimagery>
... View more
11-27-2013
07:35 AM
|
0
|
0
|
1389
|
|
POST
|
This can be solved through the CSS class .esriLegendLeft .esriLegendLeft { padding-left: 0px; }
... View more
11-20-2013
10:48 AM
|
0
|
0
|
796
|
|
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
|
1212
|
|
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
|
1444
|
|
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
|
2939
|
|
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
|
1450
|
|
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
|
1450
|
|
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
|
2669
|
|
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
|
875
|
|
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
|
1100
|
|
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
|
1419
|
|
POST
|
You could use the OpenFileDialog and specify the file type
... View more
11-06-2013
07:26 AM
|
0
|
0
|
1283
|
| Title | Kudos | Posted |
|---|---|---|
| 1 | 02-04-2025 06:39 AM | |
| 1 | 05-01-2026 08:26 AM | |
| 1 | 04-10-2026 12:01 PM | |
| 1 | 04-13-2026 09:11 AM | |
| 1 | 10-11-2023 06:18 AM |
| Online Status |
Offline
|
| Date Last Visited |
12 hours ago
|