|
POST
|
Mike, There is no secret way of taking a API Sample and making it into a widget, yet that is what you will need to do if you want an API sample to work in the Viewer. If you are going to want to do things like have an identify ability in the Flexviewer 2.0 BETA that does not have a identifyWidget developed for it yet than you will have to start from the beginning and learn how to develop a simple widget and then build off of those skills to create a more complicated widget like an identify widget. Your best bet as a beginner in Flex is to take the Sample Flex Viewer 1.x Identify widget and use that as your base to update it to be 2.0 compliant Here is the link to the SFV 1.x Identify Widget http://resources.esri.com/arcgisserver/apis/flex/index.cfm?fa=codeGalleryDetails&scriptID=15939 Learning Widget development is not hard at all especially for a GIS Programmer. Just be open to the new language and learn it's differences from your previous language experience.
... View more
08-05-2010
11:32 AM
|
0
|
0
|
1830
|
|
POST
|
Zahid, The GeometryService in the 2.0 API does not take graphics anymore it takes an array of geometries now.
... View more
08-05-2010
11:11 AM
|
0
|
0
|
1009
|
|
POST
|
Manolo, Try this:
private function identifyFeatures():void
{
var identifyParams:IdentifyParameters = new IdentifyParameters();
identifyParams.returnGeometry = false;
identifyParams.tolerance = identifyTolerance;
identifyParams.geometry = identifyPoint;
identifyParams.width = map.width;
identifyParams.height = map.height;
identifyParams.layerOption = IdentifyParameters.LAYER_OPTION_VISIBLE;
identifyParams.mapExtent = map.extent;
for (var i:Number = map.layerIds.length -1; i >= 0; i--)
{
identifyParams.layerIds = null;
var layer:Layer = map.getLayer(map.layerIds);
var url:String;
if (layer.visible)
{
if (layer is ArcGISDynamicMapServiceLayer)
{
var dynamicLayer:ArcGISDynamicMapServiceLayer = layer as ArcGISDynamicMapServiceLayer;
url = dynamicLayer.url;
if(identifyLayerOption == "visible")
{
identifyParams.layerIds = dynamicLayer.visibleLayers.source;
identifyParams.layerOption = "all";
if(dynamicLayer.visible == false)
url="";
}
}
else if (layer is ArcGISTiledMapServiceLayer)
{
var tiledLayer:ArcGISTiledMapServiceLayer = layer as ArcGISTiledMapServiceLayer;
url = tiledLayer.url;
if(identifyLayerOption == "visible")
{
if(tiledLayer.visible == false)
url="";
}
}
if (url)
{
var identifyTask:IdentifyTask = new IdentifyTask(url);
identifyTask.addEventListener(IdentifyEvent.IDENTIFY_COMPLETE, onResult);
identifyTask.addEventListener(FaultEvent.FAULT, onFault);
identifyTask.execute(identifyParams);
}
}
}
}
... View more
08-05-2010
04:40 AM
|
0
|
0
|
1812
|
|
POST
|
May, This forum has an issue with zip files when using internet explorer try Fire Fox or Google Chrome
... View more
08-04-2010
10:57 AM
|
0
|
0
|
2605
|
|
POST
|
Mark, What was meaning when I said after the onFault function was after the closing curly brace for the function like this:
//on fault
function onFault(info:Object, token:Object = null) : void
{
showMessage(info.toString(), false);
}
showGridResults(null);
... View more
08-04-2010
10:41 AM
|
0
|
0
|
1908
|
|
POST
|
Mark, Attach you SearchWidget.mxml. I test this and it worked for me.
... View more
08-04-2010
10:16 AM
|
0
|
0
|
1908
|
|
POST
|
Mark, Just add showGridResults(null); right after the onFault function inside the queryFeaturesText function and queryFeaturesGraphical function.
... View more
08-04-2010
09:44 AM
|
0
|
0
|
1908
|
|
POST
|
May, Here your updated MapManger.mxl and a new image that you need to paste in the src\com\esri\solutions\flexviewer\assets\images folder
... View more
08-04-2010
09:23 AM
|
0
|
0
|
2605
|
|
POST
|
Bjorn, I think that it is both legacy and some use to those controls in ArcMap. I know in my case, my site serves a mainly computer illiterate user base so the site has to be very visual and simple to understand that is why I have made the zoom in and out tools work with single click and dragging a box. It amazes me when I watch a person from the public use my site and they just single click away on the map untill they get to the zoom level they want to be at. So much for all the time I invested in the sites help system and documentation...
... View more
08-04-2010
08:42 AM
|
0
|
0
|
2113
|
|
POST
|
Manolo, Here you go the issue was that the mapmanager had not created the map yet when we were calling for it.
... View more
08-04-2010
08:02 AM
|
0
|
0
|
1812
|
|
POST
|
Manolo, Attach your updated code so I can see what might be going wrong.
... View more
08-04-2010
06:03 AM
|
0
|
0
|
1812
|
|
POST
|
Manolo, If it is just the map then just do this private var map:Map = SiteContainer.getInstance().controller.map;
... View more
08-04-2010
05:43 AM
|
0
|
0
|
1812
|
|
POST
|
May, So based on your code you have the overviewmap called ovCan and it is a child of the mapmanager then?
... View more
08-04-2010
05:14 AM
|
0
|
0
|
2605
|
|
POST
|
Graham, OK, lets get just a little more detail than. Global variables are suppose to be extremely simple. If you put a Public var myGlobalVar:String = "Hello World"; in the Index.mxml than you can call it from any where in code using this.parentApplication.myGlobalVar You will have access to your url parameter from the MapManager.mxml and could just put the public var there also Public var myGlobalVar:String = "Hello World"; than you can call that from anywhere using SiteContainer.getInstance().mapManager.myGlobalVar; You will have to ensure that you import com.esri.solutions.flexviewer.SiteContainer; Your idea about loading the whole barrier layer is less efficient than querying.
... View more
08-04-2010
04:10 AM
|
0
|
0
|
863
|
| Title | Kudos | Posted |
|---|---|---|
| 1 | 04-14-2020 11:36 AM | |
| 17 | 05-17-2021 01:51 PM | |
| 1 | 07-06-2020 05:32 AM | |
| 1 | 07-10-2018 05:49 AM | |
| 9 | 01-28-2022 10:58 AM |
| Online Status |
Offline
|
| Date Last Visited |
06-08-2026
06:27 AM
|