POST
|
Thanks for the quick response. One problem, I use linear interpolation to 'transpose' the range. In other words, I don't know if my range is going to be 1 to 10, 12-17 or 1 to 17... Any way to dynamically change the classBreakInfovalues?
... View more
11-17-2010
01:52 PM
|
0
|
0
|
130
|
POST
|
I need some help from someone who knows this better than I do. My workflow - call up some JSON geometry from a webservice, deserialize into an object, iterate through graphics in the object taking an attribute into account for the graphics' color, add to graphics layer...it's all good. Note that I am using a different brush for each graphic in order to symbolize a numeric attribute range. It's all good. *However* Attaching a symbolic change on mouseover/normal states while maintaining the unique color of each graphic has proven a major hurdle. I was previously using a visual state manager associated with the defaultFillSymbol to symbolize the mouseover/normal states but I cannot figure out a way to "re-use" the visual state manager while persisting the unique graphic colors... Any thoughts? Thanks, Ben
... View more
11-17-2010
12:24 PM
|
0
|
3
|
494
|
POST
|
Yes, you are right. For the sake of posterity I will explain further. I load geometry from a JSON string:
Dim geometry As userShape = DeserializeJson(Of userShape)(strGeom)
Dim gfxLyr As GraphicsLayer = TryCast(MyMap.Layers("MyGraphicsLayer"), GraphicsLayer)
gfxLyr.ClearGraphics()
Dim gfxList As List(Of ESRI.ArcGIS.Client.Graphic) = New List(Of ESRI.ArcGIS.Client.Graphic)
For Each Polygon As MainPage.Polygon In geometry.geometry
Dim pointconverter As New PointCollectionConverter
Dim pointCollection1 As ESRI.ArcGIS.Client.Geometry.PointCollection = TryCast(pointconverter.ConvertFromString(Polygon.coords), ESRI.ArcGIS.Client.Geometry.PointCollection)
Dim g As New Graphic()
Dim p As ESRI.ArcGIS.Client.Geometry.Polygon = New ESRI.ArcGIS.Client.Geometry.Polygon()
p.SpatialReference = New SpatialReference(2269)
p.Rings.Add(pointCollection1)
g.Geometry = p
IDList.Add(Polygon.ID)
gfxList.Add(g)
Next
The key line I was missing was to assign a spatial reference to each polygon. It wasn't really clear to me what the graphics were deriving their s.r. from...esp. since the graphics layer's spatial reference is readonly (no setter) - derived from the map object(?) Yeah, a little more info from the API for stuff like this...Not the first time that geometry service params have totally befuddled me. Thanks for your time
... View more
11-04-2010
06:57 AM
|
0
|
0
|
257
|
POST
|
Thanks for the quick response but no, that's not the problem Added a new var: Dim sr As ESRI.ArcGIS.Client.Geometry.SpatialReference = New ESRI.ArcGIS.Client.Geometry.SpatialReference(2838) and passed it in... svcGeom.ProjectAsync(gfxLyr.Graphics.ToList(), sr) and I still get a null reference exception.
... View more
11-02-2010
12:15 PM
|
0
|
0
|
257
|
POST
|
Struggling to debug a problem with a geometryservice projectasync call code (and I've verified the arguments)
Dim svcGeom As GeometryService = New GeometryService()
svcGeom.Url = "http://sampleserver1.arcgisonline.com/ArcGIS/rest/services/Geometry/GeometryServer"
AddHandler svcGeom.ProjectCompleted, AddressOf projectCompleted
AddHandler svcGeom.Failed, AddressOf svcGeom_Failed
svcGeom.ProjectAsync(gfxLyr.Graphics.ToList(), New SpatialReference("2838"))
StackTrace: at ESRI.ArcGIS.Client.Tasks.GeometryService.GetProjectParameter(IList`1 graphics, SpatialReference outSpatialReference, GeometryType& geomType) at ESRI.ArcGIS.Client.Tasks.GeometryService.ProjectAsync(IList`1 graphics, SpatialReference outSpatialReference, Object userToken) at ESRI.ArcGIS.Client.Tasks.GeometryService.ProjectAsync(IList`1 graphics, SpatialReference outSpatialReference) at SL1.MainPage.dlGeomComplete(Object sender, DownloadStringCompletedEventArgs e) at System.Net.WebClient.OnDownloadStringCompleted(DownloadStringCompletedEventArgs e) at System.Net.WebClient.DownloadStringOperationCompleted(Object arg) I know that the error does not lie with the URL nor the event handlers since it never makes it there. The error I get is a null reference exception. I'm totally lost here... Thanks to anyone who can help, Ben Sainsbury Oregon Metro Portland, OR
... View more
11-02-2010
11:36 AM
|
0
|
5
|
598
|
POST
|
I will reply to my own stupid thread. It seems that you shouldn't use the mouseleftbuttondown event to capture a click unless you are setting the button's clickmode property to 'release'. I got myself confused from using an api with a custom button that didn't have a click event, nor a clickMode property. The esriToolkit:Toolbar just provides the fisheye graphics to the tool images and nothing more. -b
... View more
09-18-2010
07:19 AM
|
0
|
0
|
106
|
POST
|
Struggling to create custom map tool buttons not with the esriToolkit:Toolbar - I wire up the same behavior but the custom button does not activate the draw function. XAML <Button Content="Test" MouseLeftButtonDown="Button_MouseLeftButtonDown"></Button>
<esriToolkit:Toolbar x:Name="esriTools"
ToolbarItemClicked="esriTools_ToolbarItemClicked"
Height="70" ToolbarItemClickEffect="None">
<esriToolkit:Toolbar.Items>
<esriToolkit:ToolbarItemCollection>
<esriToolkit:ToolbarItem Text="Select by dragging a Rectangle">
<esriToolkit:ToolbarItem.Content>
<Image Source="/SilverlightApplication1;component/images/license.png" Margin="5" />
</esriToolkit:ToolbarItem.Content>
</esriToolkit:ToolbarItem>
</esriToolkit:ToolbarItemCollection>
</esriToolkit:Toolbar.Items>
</esriToolkit:Toolbar> . VB Private Sub esriTools_ToolbarItemClicked(ByVal sender As System.Object, ByVal e As ESRI.ArcGIS.Client.Toolkit.SelectedToolbarItemArgs)
MyDrawSurface.DrawMode = DrawMode.Rectangle
_inputSymbol = DefaultFillSymbol
MyDrawSurface.IsEnabled = (MyDrawSurface.DrawMode <> DrawMode.None)
End Sub
Private Sub Button_MouseLeftButtonDown(ByVal sender As System.Object, ByVal e As MouseButtonEventArgs)
MyDrawSurface.DrawMode = DrawMode.Rectangle
_inputSymbol = DefaultFillSymbol
MyDrawSurface.IsEnabled = (MyDrawSurface.DrawMode <> DrawMode.None)
End Sub Can someone please shed some light on this for me?
... View more
09-17-2010
08:55 PM
|
0
|
1
|
453
|
POST
|
Thanks for taking the time to reply to this one. I can tell you gave it some thought. I will take what you've given and see if I can make something work.
... View more
08-18-2010
09:25 AM
|
0
|
0
|
176
|
POST
|
Has anyone else noticed PNG shadowing/degradation in REST export layers? We have some users reporting this in IE8 in Win7. It seems to be an IE thing but I can't find any settings under Options that may control it... Accelerator maybe? Any help is appreciated, Ben Sainsbury, Yavapai County Government
... View more
07-27-2010
10:35 AM
|
0
|
0
|
1281
|
POST
|
Anyone have any ideas for user-defined map scales? Our ArcIMS app used to handle this no problem and we've been getting some serious blowback from users who can't fit their parcel perfectly to one of the pre-specified LODs. i.e. key in the desired map scale in a text/combobox similar to ArcMap. Would it be possible to dynamically add a LOD during runtime? Thanks for any help, Ben Sainsbury Yavapai County Government
... View more
07-27-2010
10:32 AM
|
0
|
2
|
795
|
Online Status |
Offline
|
Date Last Visited |
11-11-2020
02:23 AM
|