POST
|
Finally I found a way around this. I do not understand why but it appears that setting the feature layers Mode-property to "OnDemand" somehow stops the layer from showing properly on the clone map/printmap. And this even if Where-property is later set (which according to documentation should make the mode "Snapshot"). But, since I don't think I have any problem with a "Snapshot"-mode, the problem is solved, as far as I am concerned. Cant' really remember why we decided to set it to "OnDemand" in the first place... Regards, Samuli
... View more
03-12-2015
06:09 AM
|
0
|
0
|
324
|
POST
|
After some testing it seems the problem is somewhere else in my application. I added the same FeatureLayers to the original sample and there was no problem. Now I just have to figure out what could cause this difference. Any ideas would be welcome... Regards, Samuli
... View more
03-12-2015
03:54 AM
|
0
|
0
|
410
|
POST
|
Dear Dominique, I'm using this sample in my application and otherwise it works very nicely but there is some problem with layers using PictureMarkerSymbols. They don't show on the cloned map and the symbols are also not drawn on the printable legend. Is this a bug or just something wrong with my setup? Have you ever tested with PictureMarkerSymbols? I'm using the latest version of the arcgis-samples-silverlight (from Esri/arcgis-samples-silverlight · GitHub ). By the way, I noticed the same for ArcGISDynamicMapServiceLayers constructed with DynamicLayerInfos, but this is maybe not so suprising... Thanks, Samuli
... View more
03-12-2015
02:07 AM
|
0
|
3
|
410
|
POST
|
One more update to this, although a bit of topic: I was able to use this same approach to implement a sort-of "TimeAware" WMS layer. I added both a property named "Autorefresh" and the code below in the GetURL-function in the WMS.cs and then created a custom TimeSlider-control, which updates the VisibleTimeExtent-property of the referenced WMS layers. Seems to work nicely, so just in case someone else is trying to solve this... S
if (this.Autorefresh==true)
{
//autorefresh
mapURL.AppendFormat("&t={0:hhmmss}", DateTime.Now);
}
else if (this.VisibleTimeExtent != null)
{
if (this.VisibleTimeExtent.Start == this.VisibleTimeExtent.End)
{
mapURL.AppendFormat("&TIME={0:yyyy-MM-ddTHH:mm:ss.sssZ}", this.VisibleTimeExtent.Start);
}
else
{
mapURL.AppendFormat("&TIME={0:yyyy-MM-ddTHH:mm:ss.sssZ}/{1:yyyy-MM-ddTHH:mm:ss.sssZ}", this.VisibleTimeExtent.Start, this.VisibleTimeExtent.End);
}
}
... View more
03-26-2014
06:53 AM
|
0
|
0
|
220
|
POST
|
OK, I was able to get it working. Thanks to you, Dan! Also, I think I was able to implement some sort of control over the queueing requests, not by Javascrit but by using the LostFocus- and GotFocus-events of the MainPage (RootVisual) and another timer checking if the focus was lost and not returned for more than 5 seconds (in which case the actual timer was stopped). We'll see how this works in production... Thanks again, Samuli
... View more
02-12-2014
04:54 AM
|
0
|
0
|
220
|
POST
|
Hello, Just replying to Jennifers question: Wouldn't refresh be the ideal way to update e.g. the positions of moving vehicles provided in a WMS without having the whole map to be redrawn? Or is there another way to have only one layer update? Or does refresh on one layer always refresh the whole map? Regards, Samuli
... View more
02-07-2014
03:33 AM
|
0
|
0
|
246
|
POST
|
Hello, I'm trying to accomplish a similar thing (refresh WMS containing moving vehicles) and this thread seems promising. However, I am not sure where exactly should I append the row mapURL.AppendFormat("&t={0:hhmmss}", DateTime.Now); mentioned by Daniel Walton. Am I to edit the source code of ESRI Silverlight Toolkit and build my own version of it? Sounds scary... Also, if someone should have an example of how to make Javascript and Silverlight interact to stop the timer, this too would be appreciated. I have experimented with HtmlPage.Window.AttachEvent("onblur", stopAutoRefresh); in App.xaml.cs but this seems to work for Mozilla but not IE... Thanks, Samuli
... View more
02-07-2014
03:30 AM
|
0
|
0
|
710
|
POST
|
Hello, I am trying to create a dynamic WMS-service where the content and style is defined by SLD (Styled Layer Descriptor). Everything works nicely until I try to add labels with TextSymbolizer. Or to be more precise, when I want to align the text symbols on top of my points. They simply won't align but stay stubbornly on the right side of the point. I could not find any samples of proper label placement. After looking into this it seems to me the problem is that ESRI ArcGIS Server does not really support the <sld:PointPlacement> element. Although it is said in the documentation that this element is supported, it is said in the versy same page that elements <sld:PointPlacement> and <sld:AnchorPoint> are NOT supported. Weird. So: is there any way to manage the placement of text symbols using SLD? Thanks, Samuli N.
... View more
08-29-2013
03:55 AM
|
0
|
0
|
738
|
POST
|
Hello, Just to update: seems to me this bug still exists (API version 3.0). At least for my application the workaround was to simply check EditMode and call undo twice for polygons. this.MeasureDrawObject.UndoLastVertex();
if (this.MeasureDrawObject.DrawMode==DrawMode.Polygon) //BUG: polygons need two calls
{
this.MeasureDrawObject.UndoLastVertex();
} Regards, Samuli N.
... View more
06-18-2013
03:52 AM
|
0
|
0
|
273
|
POST
|
Your reply has absolutely no use for me and the links provided are irrelevant. The problem is that ArcGIS Server automatically sets certain WKID on it's own and I have no control over this. ArcGIS Server Silverlight applications and services are also incapable of understanding synonymous coordinate systems. The only way we were able to solve this problem was by setting the Map elements coordinate system to the new WKID and using a proxy to manipulate the requests sent to outside map services so that the requests use the old WKID. I believe ESRI should do something about this and we will be contact with the national representative. SN
... View more
05-16-2013
04:44 AM
|
0
|
0
|
563
|
POST
|
Oops. Nevermind my previous message. I checked again the documentation for Draw, which clearly says "If one Draw object is activated while another Draw object is already active, the second Draw object will be automatically deactivated." I then checked our code and realized, that one of the tools in the toolbar didn't use a Draw object and of course this was the tool I had tested with. So, activating and deactivating a new draw surface also when this tool is selected did the trick. Kind regards, Samuli N.
... View more
05-15-2012
11:34 PM
|
0
|
0
|
169
|
POST
|
I have been working with a similar issue: we have a custom toolbar and we would like to disable the current draw object of the map when the user selects a tool from our toolbar, but we don't know how to do this. Note: the toolbar is a separate dll, so it doesn't "know" the name of the draw object that needs to be disabled. It should be able to disable any draw object that might be active on the map. Any ideas? Should we start up a dummy-Editor and use its functions to deactivate any possible draw object? Or is there a way to somehow get a handle on the current draw object (through the parent map object or something)? Kind regards, Samuli
... View more
05-15-2012
11:17 PM
|
0
|
0
|
169
|
POST
|
You can't mix the usage of GraphicsSource and of Graphics in the same GraphicsLayer. It's either GraphicsSource or Graphics but not both. That explain's your issues 1 and 2. OK, thanks! Does it matter which I use (for rendering)? I would seem that by default Graphics is used for feature layers as it contains a collection of graphics automatically when I retrieve it. Issue 3 is because you can't cast an IEnumerable to an IList (a list is enumerable but an enumerable is not always a list). OK, I was a bit hasty with this. However, not a very informative error message by VS... Thanks for all your help, I will continue my efforts as soon as I can (I have some other stuff to take care of for a couple of days). However, as I looked at one of ESRIs samples concerning rendering, I'm beginning to wonder whether I could achieve this functionality simply by looping through the features and setting the values for each one individually... Kind regards, samuli n.
... View more
02-14-2012
08:34 PM
|
0
|
0
|
525
|
POST
|
Dear Dominique & others, I tried the code you provided but could not get it to work. Below is my attempt: var flSource = featLyr.GraphicsSource;
var newSource = flSource.Join(this.elementListItems, fl => (int) fl.Attributes["OBJECTID"], db => (int) db.FID,
(fl, db) =>
{
var g = new Graphic {Geometry = fl.Geometry};
g.Attributes["Aloitusajankohta"] = db.Aloitusajankohta;
g.Attributes["Nimi"] = db.Nimi;
return g;
});
featLyr.GraphicsSource = (IEnumerable<Graphic>)newSource; First problem: featLyr.GraphicsSource is null. I haven't yet investigated this further. I continued by taking the Graphics-collection of the feature layer instead of the GraphicsSource: var flSource = featLyr.Graphics; Second problem: Debugger says "Graphics collection must be empty before using GraphicsSource." at featLyr.GraphicsSource = (IEnumerable<Graphic>)newSource; Again, I skipped this and tried to simply access the graphic list to see if I got the attributes added. Third problem: cast (IList<Graphic>)newSource failed with the following error: "Unable to cast object of type '<JoinIterator>d__61`4[ESRI.ArcGIS.Client.Graphic,Boris2Entity.Osa_versio,System.Int32,ESRI.ArcGIS.Client.Graphic]' to type 'System.Collections.Generic.IList`1[ESRI.ArcGIS.Client.Graphic]'." At this point I gave up for the time being, I have to return to this tomorrow. In the meanwhile if anybody has any tips on this, they will - again - be very welcome... Regards, samuli n.
... View more
02-14-2012
03:17 AM
|
0
|
0
|
525
|
POST
|
Great! Thanks a million! I will try this out as soon as I can! Regards, Samuli
... View more
02-13-2012
04:16 AM
|
0
|
0
|
525
|
Online Status |
Offline
|
Date Last Visited |
11-11-2020
02:23 AM
|