POST
|
Not the answer I was hoping for, but thank you for the reply! Out of curiosity, is there a particular reason that this feature in not implemented in the Silverlight version (since the feature exists in Flex)? Is this something that will/could be implemented in a future version of the Silverlight API? Thanks again!
... View more
07-19-2012
04:45 AM
|
0
|
0
|
528
|
POST
|
Hi everyone! The Flex API's Geometry class has a static method called fromJSON() that lets you easily get a Geometry object from a JSON string that respresents a geometry. For example, you could do something like Geometry.fromJSON("\"geometry\":{\"x\":-10619660.612597,\"y\":3474324.60413219") and receive a Point object. Does the Silverlight API have something similar to this? I see that the FeatureSet and FeatureLayer classes have a FromJson method, but they require more than a more complex JSON string that contains more than just the geometry values, and will also create an entire FeatureSet or FeatureLayer that I don't need. How would I go about doing something like this? Any help would be greatly appreciated! Thanks! Mike
... View more
07-18-2012
05:17 AM
|
0
|
3
|
2990
|
POST
|
Alright, so I sort of figured out what the issue was. When using the map from the viewer, the MapTip has to be assigned directly to the Graphic, and not the GraphicLayer. Not sure why this is... when using my own map, I can add the MapTip to the Graphic itself, OR the GraphicLayer, and it will work in both cases. For some reason, when using the viewer's map, adding the MapTip to only the GraphicLayer is not sufficient, and needs to be added to each Graphic individually. I can work around this limitation (for lack of a better word), although I am still curious as to why this behavior exists. Feel free to add any thoughts on that, as I am very interested to hear them! Thanks for your time!
... View more
03-22-2012
10:16 AM
|
0
|
0
|
361
|
POST
|
I have run into an interesting problem where I am able to get MapTips working on a map that I create myself, but not on the map provided by the MapApplication.Current.Map reference. I created an AddIn (just a Command that opens up a new user control/window) that contains the code from the example provided at http://help.arcgis.com/en/webapi/silverlight/samples/start.htm#GraphicsMapTip, with a few changes. The control doesn't create it's own map, but uses the map provided from MapApplication.Current.Map. I use the same GraphicsLayer xaml code provided from the example, but just put it inside the user control's LayoutRoot resource list instead, and add the graphic layer to the application's map when the control loads with the MapApplication.Current.Map.Layers.Add method. Doing this, the geometries are showing up, but the MapTips won't display. As a test, what I did was create my own map within the user control, using the same map xaml code from the example. I added the graphic layer to this map instead of the one provided from the MapApplication, and the geometries display with the MapTips. The code is exactly the same, just referencing a different map. I actually have a sample now with two identical graphic layers, one assigned to each map, with copies of the graphic returned from the query added to each layer. In this example, MapTips display in my user control with my own map, but not on the viewer's map. Anyone know why this might be? Is there a step that I'm missing to get MapTips to display on the viewer's map? Any help is greatly appreciated. Thanks! Mike
... View more
03-21-2012
07:15 AM
|
0
|
4
|
2196
|
POST
|
Hi everybody! I have stumbled across a strange problem that I cannot explain, and any help would be appreciated. I am trying to use a Geometry Service's union feature to unionize graphics that the user can draw. So far, I am able to get unions working with any combination of the following: Extents (user draws an extent with the Draw class, but I convert it to a 5 point polygon) Polygon (from Draw class, but ONLY when the user draws it clockwise) Spatial Polygons (not sure if that is the correct term, but geometries returned from a query task) However, if the user draws a circle with the draw tool, or draws a polygon counter clockwise, the union doesn't work. It will return a valid response, but there will be no ring for the circle or counter-clockwise polygon. So, for example, if I try to union a square and a circle, only a 5 point ring for the square will be in the union response. If I do two squares, or a square with a spatial polygon, all appropriate rings are returned in the union response. My initial impression based on the draw polygon behavior was to do with the orientation of the points (clockwise vs counter-clockwise), but I imagine that the circle polygon returned by the draw tool would have a valid orientation... so I am not sure if this thought process is correct at all. The only thing I am doing with the geometries that are returned from the drawtool or query task is creating a graphic and adding it to the map's graphic's layer. So no additional processing is being done. My union code is based off of the sample provided at http://help.arcgis.com/EN/webapi/silverlight/samples/start.htm#Union . I haven't changed anything other than the source of the graphics. Is there a property that needs to be specified in the graphic or geometry before sending it for a union? Is there a utility function somewhere that can correct the orientation of the polygon (if that is in fact the problem)? Any help would be appreciated. I am absolutely stumped! Thank you in advance! Mike
... View more
03-05-2012
09:35 AM
|
0
|
1
|
2020
|
POST
|
Hi everyone! Is it possible to configure a widget so that it does not display in the header controller? I would like to have a widget that can only be opened from another widget (instead of clicking the widget's icon on the header controller). I have tried to configure a widget with the other default ones (like NavigationWidget, OverviewWidget), but doing this will cause the widget to be preloaded automatically (regardless of what value I put in the preload attribute). I am not 100% sure that I actually need to configure a widget in the config.xml file, but the only way I know how to load one manually is through the widgetManager, which requires a configuration entry. If there is a way to load a widget without configuring it, I will be able to bypass the aforementioned issues. For reference, this is the code I am using to load: widgetManager.getWidget(widgetManager.getWidgetId("My ID"), true); So, in summary: Is there a way to configure a widget without it displaying in the header controller and not having it automatically preload? Alternatively, is there a way to load a widget without having to configure it? Thank you for your time. Any help is greatly appreciated. Thanks! Mike
... View more
12-07-2011
06:39 AM
|
0
|
1
|
216
|
Online Status |
Offline
|
Date Last Visited |
11-11-2020
02:24 AM
|