|
POST
|
Matthew, Yep if you adjust the canvas height and width in the WidgetTemplate.mxml than you will be affecting all widgets but if you follow what I said only the LiveMapsWidget will be changed.
... View more
08-11-2010
01:05 PM
|
0
|
0
|
1602
|
|
POST
|
Aron, Just because you have the GP setup and working in desktop does not mean that you have all the parameters setup correctly for the GP to be published and usable as a service in server. There are some very specific step you have to take for a GP to be ready to publish to server. I cover the steps for start to finish in the thread. http://forums.esri.com/Thread.asp?c=158&f=2421&t=285944&mc=7
... View more
08-11-2010
01:01 PM
|
0
|
0
|
1253
|
|
POST
|
Matthew, The height and width have to be set on the WidgetTemplate inside the LiveMapsWidget.mxml code. Glad to see your not giving up on Flex. Once you learn it, it is a great development platform.
... View more
08-11-2010
12:26 PM
|
0
|
0
|
1602
|
|
POST
|
Aron, Have you not seen the GP samples like http://help.arcgis.com/en/webapi/flex/samples/index.html?sample=GP_Viewshed ?
... View more
08-11-2010
12:18 PM
|
0
|
0
|
1253
|
|
POST
|
James, You are mixing web-mercator basemap services from esri and your that is WGS-84 too different projections that is why you can not see yours. You either need to use esri wgs-84 map services like http://server.arcgisonline.com/ArcGIS/rest/services/ESRI_StreetMap_World_2D/MapServer instead.
... View more
08-11-2010
12:16 PM
|
0
|
0
|
1258
|
|
POST
|
Alexander, yes try tiledlayer.minScale = somenumber; It would be best to have the exact number.
... View more
08-11-2010
07:31 AM
|
0
|
0
|
1560
|
|
POST
|
Manolo, if the AboutPouup is not part of the classicController folder than you have to import it using something like import com.esri.viewer.AboutPopup;
... View more
08-11-2010
07:28 AM
|
0
|
0
|
1019
|
|
POST
|
Alexander, Why don't you just set the minScale property of the ArcGISTiledMapServiceLayer so that it does not display at scales where data does not exist?
... View more
08-11-2010
04:50 AM
|
0
|
0
|
1560
|
|
POST
|
Tom, OK, That code is not mine, so I can not help with that. You will have to wait for this functionality until you switch to flexviewer 2.0.
... View more
08-11-2010
04:44 AM
|
0
|
0
|
2117
|
|
POST
|
Ian, You have not done anything wrong. The locate widget is hard coded to reproject anything that is other than web mercator. Here is the offending line you need to fix. locateResult.point = map.spatialReference.wkid != 4326 ? WebMercatorUtil.geographicToWebMercator(addrCandidate.location) as MapPoint : addrCandidate.location; Change to: locateResult.point = ddrCandidate.location;
... View more
08-11-2010
04:40 AM
|
0
|
0
|
607
|
|
POST
|
ldv78, I don't think that your question is very clear. The LiveLayerWidget can easily display a point or polygon mapservice layer all you do is specify a xml file for that specific layer. Is your question how to configure the widget?
... View more
08-10-2010
07:12 PM
|
0
|
0
|
1049
|
|
POST
|
Charlie, This is the best way I know how to get at it.
import mx.rpc.events.FaultEvent;
import mx.rpc.events.ResultEvent;
import mx.rpc.http.HTTPService;
import com.esri.serialization.json.JSON;
private var httpServ:HTTPService;
httpServ2 = new HTTPService;
httpServ2.url = "http://yourServer/arcgis/rest/services/yourService/mapserver/0?f=json";
httpServ2.addEventListener(ResultEvent.RESULT, xmlResult);
httpServ2.addEventListener(FaultEvent.FAULT, xmlFault);
httpServ2.send();
private function xmlResult(event:ResultEvent):void
{
var Info:Object = JSON.decode(event.result.toString());
var defExpr:String = Info.definitionExpression;
}
private function xmlFault(event:FaultEvent):void
{
var sInfo:String = "Error: ";
sInfo += "Event Target: " + event.target + "\n\n";
sInfo += "Event Type: " + event.type + "\n\n";
sInfo += "Fault Code: " + event.fault.faultCode + "\n\n";
sInfo += "Fault Info: " + event.fault.faultString;
trace(sInfo);
}
... View more
08-10-2010
07:05 PM
|
0
|
0
|
2268
|
|
POST
|
Kirti, Try this
//Add this import at the top with the others
import mx.binding.utils.ChangeWatcher;
//replace your existing function with this one
private function showStateLegend(event:MouseEvent):void
{
WidgetEffects.flipWidget(this, viewStack, "selectedIndex", 1, 400);
//This is where we determine if this is the first call to make
//the legend or do we just need to update it
if (legendRepeater.dataProvider != null){
updateLegend();
} else {
showMessage("Please be patient while the Legend is generated...", true);
var liveLayers:Array = getLayers();
var url:String;
for (var i:int = 0; i < liveLayers.length;i++) {
if (liveLayers is ArcGISDynamicMapServiceLayer) {
if (ArcGISDynamicMapServiceLayer(liveLayers).id != "Aerial Photography")
{
requestCount++;
url = ArcGISDynamicMapServiceLayer(liveLayers).url.replace("rest/", "");
webService.generateLegends.send(url, 96, 20, 20, ArcGISDynamicMapServiceLayer(liveLayers).id);
ChangeWatcher.watch(ArcGISDynamicMapServiceLayer(liveLayers), "visibleLayers", updateLegend2);
}
} else if (liveLayers is ArcGISTiledMapServiceLayer) {
requestCount++;
url = ArcGISTiledMapServiceLayer(liveLayers).url.replace("rest/", "");
webService.generateLegends.send(url, 96, 20, 20, ArcGISTiledMapServiceLayer(liveLayers).id);
ChangeWatcher.watch(ArcGISTiledMapServiceLayer(liveLayers), "visibleLayers", updateLegend2);
}
}
}
}
... View more
08-10-2010
06:47 PM
|
0
|
0
|
2117
|
|
POST
|
Pete, To have any widget opened at start up all you have to do is add the attribute preload="open" tot the widget in your config.xml
... View more
08-10-2010
01:55 PM
|
0
|
0
|
639
|
|
POST
|
Mathew and Joshua, I can see both of your points once the full featured java and .net web adfs are actually gone. But for now you are paying for ArcGIS server that has a good development environment that never claimed to be for non developers. Once the web adfs are actually gone then I have full confidence that esri will have the APIs and their viewers ready to step up and take their place. That point they will no longer be in Beta and be tried and proven. I have to say that at times it is hard for me to grasp why people have difficulty with the flex or .net environments as I have always found my answers in the samples or on the forums or been provided assistance form one of the esri staff. So either the JS, Flex, Silverlight or sharepoint whichever you choose just keep at it and post questions to the forums 🙂
... View more
08-10-2010
01:41 PM
|
0
|
0
|
1156
|
| 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
|