|
POST
|
So you recommend using GraphisLayer and have a "duplicate" mapping between my ViewModel and a Graphics, instead of placing my ViewModel directly into the ElementLayer and avoid the duplication? Using ElementLayer might also remove the need to synchronize selection between our ViewModels in list and in the map (ViewModel is selected inside an ItemsControl, and it's corresponding Graphic should be selected). Also, it would also simplify drag and drop between the map and other parts of the application by removing the lookup of the ViewModel based on Graphic. Say a user wishes to drag a vehicle from the map, and drag it to a list of some kind. I might be arguing my own case here in favor of ElementLayer, though I miss some more documentation in the API about ElementLayer and when to use it (work in progress, I know). I would also like your opinion here. What can the GraphicsLayer do that the ElementLayer can't?
... View more
11-30-2010
11:01 AM
|
0
|
0
|
1222
|
|
POST
|
😞 Thank you for being so active in the forums. From old experiences with the old ArcObjects forums with almost no questions being answered, it is great to be able to get help from the team developing the product in such a short time. Best regards, Bjørnar Sundsbø
... View more
11-30-2010
10:28 AM
|
0
|
0
|
899
|
|
POST
|
Some more information: I have a MVVM application, and would like to place some of my ViewModels in the map. I just noticed the ElementLayer. It seems like I could use this to avoid having to introduce and update a Graphic for every item I want to place in the map. Every time I change the geometry, I could use the SetEnvelope property. I suppose this might be a solution for my post about Styling Graphic. The question is, how is the performance of ElementLayer compared to a GraphicLayer as this layer contains "heavier" objects. I assume I would still have the problem I face in Location of PictureMarkerSymbol vs MarkerSymbol.
... View more
11-30-2010
10:24 AM
|
0
|
0
|
1222
|
|
POST
|
I was thinking of that myself, though I was not sure how to get the ActualHeight and ActualWidth from the ControlTemplate after it's content has been populated from the attributes. I assume the IRenderer will come into effect each time an attribute changes, so the offset can be changed if any changes are made? I'm looking into the links you sent me. It seems this is a thing more people would be interested in, and perhaps there could be a property on the MarkerSymbol for with an enum with the following values: Manual (uses manual offset values), CenterX (centers on the X axis), CenterY (centers on the Y axis), CenterBoth (center both X and Y). Pretty much like the SizeToContent property of a Window. If the GraphicElement was not internal, I think I might have been able to bind the offsetX and Y to RelativeSource={RelativeSource AncestorType={x:Type GraphicElement}} and ActualHeight. Sadly, this is one more situation where I feel the API has too many internal members and types (in my humble opinion :)) I have a related question in Which layer do i Choose.
... View more
11-30-2010
10:23 AM
|
0
|
0
|
515
|
|
POST
|
Jennifer, Sorry, I thought I mention the version I'm using. I'm on API 2.1 RC.
... View more
11-30-2010
08:19 AM
|
0
|
0
|
899
|
|
POST
|
The trouble with both those approaches is that I don't know the length (or tedious to calculate) of the label as it is a TextBlock, and can have any font size defined by the user. So the calculating the pixel width of characters to find out the width of the markerSymbol is quite complex. I then also have to include the width and height of the symbol (arrow) with margins etc, and add that to the logic of the converter, or whichever approach I use.
... View more
11-30-2010
05:35 AM
|
0
|
0
|
1062
|
|
POST
|
Setting SpatialReference from the outside does not work, as the setter is protected. I'm very frustrated over the Map property being internal. I expect alot of custom implementations might need to get access to the maps spatial reference (and other information as well). Currently I have no workaround, but I'm looking into it. I do not wish to add special properties to my custom layer to be able to solve the problem. An attached property on each layer binding to the map is a possible solution, though not very satisfactory. Bjørnar
... View more
11-30-2010
03:50 AM
|
0
|
0
|
1128
|
|
POST
|
If you define a ControlTemplate for the symbol (such as in use with a Renderer), you can try to bind the topmost control in the template to your Visible attribute. I haven't tried it myself, but it should work. At least I hope it does, as I would like to do the same myself soon.
... View more
11-30-2010
02:25 AM
|
0
|
0
|
2999
|
|
POST
|
I'm trying to use the KmlLayer against http://wms.met.no/googleearth/metno.kml but get the following exception. Unhandeled exception System.Xml.XmlException: Invalid character in the given encoding. Line 48, position 16. I'm using version 2.1 RC of the API. The Toolkit.DataSources source available on codeplex does not include this class, so I'm not able to debug it. Anyone who is able to make this service work, or provide any information on a fix?
... View more
11-30-2010
01:24 AM
|
0
|
10
|
1918
|
|
POST
|
Jennifer, I'm currently building against .NET 3.5, and compiling the toolkit to that version gives me some problems with VisualStateGroup and State manager not being available. This makes sense, though I can't think of how to build it to target 3.5. Also, based on the numbers of doubles being parsed, I need to pass in InvariantCulture to all the places a double is parsed. Before I can do that, I guess I have to overcome the VisualStateManager issues. Any suggestions?
... View more
11-29-2010
11:57 PM
|
0
|
0
|
899
|
|
POST
|
I can't use TextSymbol as I need to display an arrow pointing the direction a vehicle is driving, in addition to the text label.
... View more
11-29-2010
12:28 PM
|
0
|
0
|
1062
|
|
POST
|
Hi I try to use WmsLayer to display (obviosly) an image from a WMS service. This fails, with no image being presented. Thanks to Fiddler2, I was able to find out that the problem was invalid request for BBOX where decimal points were sent using a comma instead of a period. I use a system with Norwegian culture setting. Changing the application to use en-US, I got it working. The problem is that I can't change the culture for the whole application as that will lead to some unexpected issues for the user. Any suggestions for a bugfix, and perhaps a temporary fix? I assume the WMS specifications expects period as the decimal separator, so perhaps this could be forced to use a period? Bjørnar Sundsbø
... View more
11-29-2010
12:06 PM
|
0
|
8
|
1370
|
|
POST
|
Dave, Thanks. I think I will use some of that concept to set the SpatialReference of the layers to match the SR of the Map, and do the transform inside of the layer. Since the layer contains dynamic features, I will need to transform the geometries on every update as well, and excessive propertychanged events might become a bit "complex" and unreadable in lack of a better word. Bjørnar
... View more
11-27-2010
07:48 AM
|
0
|
0
|
1128
|
|
POST
|
Hi I have pretty much the same problem, however, as I include a label (textblock) to the element, I can't set the offset to a fixed number of pixels. This is because the height and with of the label is dynamic. How can I do this in a dynamic way? I've tried RenderTransformOrigin and TranslateTransform with no apparent luck.
... View more
11-26-2010
07:59 AM
|
0
|
0
|
1062
|
|
POST
|
Dave, Do you by any chance have a small sample you can provide that does this? If you do, that would be great. Based on your suggestion, would such behavior modify the geometries of the Graphic objects, or add logic "on top" of the existing layer? Bjørnar
... View more
11-25-2010
11:30 AM
|
0
|
0
|
1128
|
| Title | Kudos | Posted |
|---|---|---|
| 2 | 05-09-2015 09:20 AM | |
| 1 | 05-09-2015 01:36 PM |
| Online Status |
Offline
|
| Date Last Visited |
11-11-2020
02:23 AM
|