|
POST
|
It seems the issue is in your proxy. You can't rely on the ContentLength that may be equals to -1. I would suggest code like: BinaryReader br = new BinaryReader(byteStream);
int length = (int)serverResponse.ContentLength;
if (length < 0) length = 10000000;
byte[] outb = br.ReadBytes(length);
br.Close();
... View more
06-13-2013
09:22 AM
|
1
|
0
|
963
|
|
POST
|
Please look at this thread that gives possible workarounds.
... View more
06-13-2013
08:49 AM
|
0
|
0
|
596
|
|
POST
|
The old proxy http://serverapps.esri.com/SilverlightDemos/ProxyPage/proxy.ashx is off. The interactive SDK is now using this proxy: http://servicesbeta3.esri.com/SilverlightDemos/ProxyPage/proxy.ashx We can use it for test purpose but for production you should set your own proxy.
... View more
06-13-2013
08:40 AM
|
0
|
0
|
1376
|
|
POST
|
I don't see in your code where you put the map in the visual tree. That might explain why the map doesnt' show up:)
... View more
05-24-2013
06:41 AM
|
0
|
0
|
762
|
|
POST
|
I appreciate the response Dominique, unfortunately that will not resolve my dilemma. I have to use a layer list that will always be displayed for the user, allowing them to turn on/off whatever they need. If I created a layer for each units calls by year I would have a layerlist that was entirely too large for the user to look at. Sorry I don't get the dilemna. Is it that instead of selecting just one year in a combox, you want to select a set of years? In this case we can build the where clause by a concatenation depending on the checked years: YEAR='1980' OR YEAR='1985'.... Did I miss something?
... View more
05-24-2013
06:37 AM
|
0
|
0
|
971
|
|
POST
|
OK - I think I get the concept now. Based on your answer to another question I asked it looks like this is the basic process to do what I want to do: 1. Search for layer type portal items. 2. Take portal item of choice and plug it into a web map that you've created programmatically 3. Take that web map and use Document to get the map from it. Does that sound about right? Exactly :cool:
... View more
05-24-2013
06:32 AM
|
0
|
0
|
2151
|
|
POST
|
Can you instantiate web map from a portal item whose type is "feature service"? I'm trying to create a web map asynchronously from an ArcGISPortalItem that is simply a layer of type "feature service" and when I call WebMap.FromPortalItemAsync(...); No, unfortunately, for now, the creation of a webmap from a portal item works only if the item is of type WebMap. To create a webmap from a portal item of type 'feature service', you have to instantiate the webmap by code (sample), instantiate a webmaplayer, set the Url, Id and ItemId properties of the webmaplayer, add the webmaplayer to the webmap.OperationalLayers and create the map from the webmap using Document.GetMapAsync(webMap)
... View more
05-23-2013
09:43 AM
|
0
|
0
|
1146
|
|
POST
|
That's really interesting, I didn't know you could do that. What I want to do is take the ArcGISPortalItem and create an actual layer from it. Is there a way to do this without using the WebMap API? I've tried adding a FeatureLayer from a feature service ArcGISPortalItem object like so:
// Fetch portal items via search. Grab one portalItem ...
FeatureLayer featureLayer = new FeatureLayer();
featureLayer.Url = portalItem.Url;
featureLayer.Initialized += featureLayer_Initialized;
featureLayer.InitializationFailed += featureLayer_InitializationFailed;
featureLayer.Initialize();
MyMap.Layers.Add(featureLayer);
[\CODE]
But nothing happens. The map is not updated with the FeatureLayer.
Is there a way to map ArcGISPortalItems to the ArcGISTiledMapServiceLayer, ArcGISDynamicMapServiceLayer, etc.... ? It looks like you should be able to do something like this, right?
Thanks,
- Aaron If the URL of your portal item is a feature layer URL (i.e with a layerId at the end such as ....../MapServer/4), your code should work. The risk is that your URL is the URL of a map service or a tiled service. Is this case you have to create the right layer type (i.e ArcGISMapServiceLayer or ArcGISTiledMapService layer). Note: It's one of the advantages of using the webmap model. Under the cover, the service metadata are analyzed and the right layer type is created.
... View more
05-23-2013
09:35 AM
|
0
|
0
|
2151
|
|
POST
|
Couldn't you just publish the mxd at server side? If you are trying to do it at client side only, did you look at this 'Using PointDataSource' sample? It demonstates how to create a graphics layer by binding to a source of items that reference location using X and Y values (but doesn't demonstrate how to use a OLE DB connection to populate the model though)
... View more
05-23-2013
12:54 AM
|
0
|
0
|
954
|
|
POST
|
I don't know any sample doing exactly that. However a good starting point is this CreateWebMapFromObjects sample that leverage the WebMap API to create a new webmap.
... View more
05-23-2013
12:45 AM
|
0
|
0
|
2151
|
|
POST
|
For such scenario, I recommend to use the WebMap model. You can instantiate a webmap from a portal item using http://resources.arcgis.com/en/help/silverlight-api/apiref/api_start.htm?ESRI.ArcGIS.Client.Portal~ESRI.ArcGIS.Client.WebMap.WebMap~FromPortalItemAsync.html. Then you can modify it using the webmap API and finally create the map from the webmap using Document.GetMapAsync(webMap)
... View more
05-23-2013
12:38 AM
|
0
|
0
|
1146
|
|
POST
|
I tried the following code but only the first call of GetResultDataAsync completes(message box appears for the parameter called), therefore you cannot "execute sequentially GetResultDataAsync". That�??s what I was failing to say clearly�?� execute the second GetResultDataAsync when the first one is completed, i.e in the geoprocessorTask_GetResultDataCompleted Handler. In short: 1) call your first GetResultDataAsync 2) in the Handler get the parameter name 3) execute your specific code for this parameter name 4) call again GetResultDataAsync for the next parameter (until the last one)
... View more
05-23-2013
12:31 AM
|
0
|
0
|
1540
|
|
POST
|
To get the closest point from a point, we can also do it at client side by calculating the distance between 2 points and selecting the minimum value 🙂
... View more
05-23-2013
12:24 AM
|
0
|
0
|
2115
|
|
POST
|
I have a utilities Silverlight application and I've been getting requests to build some tools for utilizing the geometric network. My water users would like to isolate shutoff valves and stuff like that. I was wondering if there were any examples out there (for silverlight) or if there was something in the API. I did find this GP, which will be a good start but was wondering if there was anything in the silverlight API tools. http://resources.arcgis.com/en/help/main/10.1/index.html#//0154000005s0000000 The other option I was looking at is here: http://resources.arcgis.com/gallery/file/arcobjects-net-api/details?entryID=0F09D031-1422-2418-8839-02AE02C23A15 I haven't look at this option extensively but it looks like the tools provide are written in JS so I was wondering if anyone has used this extension with Silverlight? Thanks You can publish a geoprocessing model at server side (such as the sample you pointed out: http://resources.arcgis.com/en/help/main/10.1/index.html#//0154000005s0000000 ) and then use the geoprocessing functions at client side. I don't know any SL sample, but such a WPF sample has been done for dev summit (http://www.arcgis.com/home/item.html?id=3f69c79bbd7340b09fad396647a977a5). As the APIs are very close (except no local services in SL), it should be a good starting point.
... View more
05-23-2013
12:21 AM
|
0
|
0
|
542
|
|
POST
|
I have writers block on this one - so deep I cannot even provide any code to start with. I have a feature class that contains fields for: UNITS: Emmergency Service Vehicles YEAR: Year of a call the unit went on (4 years are covered) In this feature class there are multiple calls for each unit during each of the years. I have been asked to create a map which a user can select a unit, or multiple units, with a checkbox, and then in a different layer list select the year they wish to view, or multiple years. Example: I have UNIT A, UNIT B and UNIT C turned on (checked) in one list, I then turn on (check) 2010 and 2011 in another list and points populate the map that those units went on during those years. I have the feeling this might be a basic solution, but I cannot find an example. I am still a novice at Silverlight so this is not coming easy. Any recommendations would be extremely appreciated. Thank you The closest sample I know is this one: http://resources.arcgis.com/en/help/silverlight-api/samples/start.htm#AttributeQuery It allows to select a state from a combobox and display the feature accordingly.
... View more
05-23-2013
12:12 AM
|
0
|
0
|
971
|
| Title | Kudos | Posted |
|---|---|---|
| 1 | 05-12-2025 03:01 AM | |
| 1 | 10-14-2025 09:24 AM | |
| 1 | 06-13-2013 09:22 AM | |
| 1 | 04-29-2022 02:21 AM | |
| 1 | 04-29-2022 02:28 AM |
| Online Status |
Offline
|
| Date Last Visited |
10-30-2025
08:06 AM
|