POST
|
upgraded to 2.4 ESRI WPF & fixed a load of display/refresh bugs - see readme.txt for full info
... View more
04-27-2012
06:11 AM
|
0
|
0
|
473
|
POST
|
had same question... http://forums.arcgis.com/threads/42568-layer.IsInitialized-and-InititializationFailure-event end of thread explains the approach I took. chris
... View more
01-03-2012
05:37 AM
|
0
|
0
|
588
|
POST
|
I guess my point is more along the lines of, "Why take away something that's working just fine and so many people have already implemented"? I'm not really looking for any improvements as it seems to work just fine the way it is. Your comment on searching bing/google for tutorial & source code isn't even necessary with the current toolbar. It's there. You add it, wire it to your map and done. This all gets back to my main point, and I think Patrick's point too - Why take away something that aready exists and works just fine? Why is any code deprecated, someone will always be using the code in question. But I am sure ESRI have good reasons 🙂 Maybe one less control for them to support - although a very basic control with little that can go wrong Reduce the overall download size of the toolkit assembly Encourage more interesting and individual websites instead of many ESRI sample site clones Only ESRI Silverlight team can answer your question. But the effort involved to keep your App the same is very little - download the code from Codeplex and add it to your app - 30 minutes work
... View more
12-01-2011
10:51 AM
|
0
|
0
|
633
|
POST
|
To add my £0.02 worth I'm with ESRI on this one, basic control that anyone can create I would much prefer they invested time in better and faster mapping functionality 🙂 than basic controls you can spend 5 minutes searching on google/bing and find a tutorial & source code for. As Dominique has pointed out the code is on codeplex, so no big deal to take the code and add it to your own control library, then point your xaml to this control - very small job Cheers Chris
... View more
12-01-2011
06:34 AM
|
0
|
0
|
633
|
POST
|
just in case anyone is interested, this is how I implemented it... 1) Added a trigger to InvokeCommandAction on my ToggleControl, this fires on click event 2) Created ReInitialiseLayerCommand on ViewModel -----a) this recreates the layer, -----b) deletes the failed one from LayerCollection -----c) inserts the new one at the original collection index -----d) raises relevant propertychanged event 3) Created ConditionalExpression on trigger, this is bound to Layer.InitializationFailure property using a ValueConverter to convert from Exception to boolean, so when this evaluates to true it will invoke the ReInitialiseLayerCommand when the user clicks the ToggleControl 4) Added Image (indicates no internet connection/network problem) to content of ToggleControl, visibility = collapsed - 5) Bound the Image to Layer.InitializeFailure using ValueConverter when evaluates to true Image is set visible indicating to the user that there is an issue with the layer A little convoluted but works well Chris
... View more
12-01-2011
01:37 AM
|
0
|
0
|
752
|
POST
|
Hi Thanks for the responses, apologies for not getting back sooner - app releases & deployments taking priority 🙂 Reflector is indeed a great app InitializationFailure, InitializedFailed & IsInitialized - understand they are events properties etc - I posted at the end of the day and in a rush so may have been a typo in the original posting 🙂 Here is the scenario... 1) ItemControl ItemsSource is bound to a LayerCollection 2) Layers are loaded at runtime in code behind from a config file into the LayerCollection, the available layers change by user group 3) There maybe 20+ layers available for the user to select from 4) Each layer item in the ItemControl contains a ToggleControl to switch layer visibility problem... 1) 1 layer out of 20 fails to initialize 2) the ToggleControl that is bound to the layer when toggled to set the layer visible fails to set the layer visible because it is not Initialized 3) if the layer has failed to initialize then the ToggleControl needs to be able to reinitialize the layer - this wont work as you are not able to reinitialize the layer What I need is for the ToggleControl when toggled to detect initialization failure of a layer and for the layer to be deleted from the LayerCollection if it failed to initialize. The Layer will then need to be recreated and inserted into the LayerCollection at the same index I have a few things to try - will get back at some point if I get a solution that doesnt involve the user reloading the page Still baffled by the IsInitialized meaning it only attempted to initialize :S and not being able to try and reinitialize the layer in code Chris
... View more
11-25-2011
02:33 AM
|
0
|
0
|
752
|
POST
|
bit more info, normalizing the geometry doesn't update it... before normalizing to central meridian... envelope {-6217054.07748237,3083200.58936723,19742372.9881015,13268766.2816879} base {ESRI.ArcGIS.Client.Geometry.Geometry}: {-6217054.07748237,3083200.58936723,19742372.9881015,13268766.2816879} Extent: {-6217054.07748237,3083200.58936723,19742372.9881015,13268766.2816879} Height: 10185565.692320695 Width: 25959427.065583907 XMax: 19742372.988101542 xmax: 19742372.988101542 xmin: -6217054.077482366 XMin: -6217054.077482366 ymax: 13268766.281687925 YMax: 13268766.281687925 YMin: 3083200.58936723 ymin: 3083200.58936723 after normalizing to central meridian... normalizedEnvelope {-6217054.07748237,3083200.58936723,19742372.9881015,13268766.2816879} [ESRI.ArcGIS.Client.Geometry.Envelope]: {-6217054.07748237,3083200.58936723,19742372.9881015,13268766.2816879} Extent: {-6217054.07748237,3083200.58936723,19742372.9881015,13268766.2816879} GeometryChanged: null SpatialReference: {ESRI.ArcGIS.Client.Geometry.SpatialReference}
... View more
11-25-2011
01:57 AM
|
0
|
0
|
203
|
POST
|
Hi Using ESRI Bing geocoder for search address 'United States' the best view returned is : SouthWest.Lon = 177.348754 SouthWest.Lat =26.677207 NorthEast.Lon = -55.848747 NorthEast.Lat = 75.762794 When creating points and converting from WGS84 to WebMercator then constructing an Envelope for the Map to ZoomTo(), the map zooms to Europe, Asia & North Africa. When drawing out the coordinates on paper the best view spans the date line (I have tried Geometry.NormalizeCentralMeridian()) Here is some sample code...(coordinates have been hardcoded and switched round multiple times in the new Envelope() constructor in an attempt to try and get it to work)
var southWest = Transform.GeographicToWebMercator(new MapPoint(177.348754, 26.677207, new SpatialReference(4326)));
var northEast = Transform.GeographicToWebMercator(new MapPoint(-55.848747, 75.762794, new SpatialReference(4326)));
var envelope = new Envelope(northEast.X, southWest.Y, southWest.X, northEast.Y);
envelope.SpatialReference = new SpatialReference(102100);
SomeMap.ZoomTo(Geometry.NormalizeCentralMeridian(envelope));
am I missing anything obvious? any pointers/help would be much appreciated Chris
... View more
11-25-2011
01:26 AM
|
0
|
1
|
1137
|
POST
|
If you hover over the IsInitialized property in code it states... "Returns true if the layer has been initialized." but the layer has not been initialized, it has failed to initialize.
... View more
10-28-2011
08:13 AM
|
0
|
0
|
752
|
POST
|
Hi On occasion one or more of my feature layers fails to initialize, I receive the InitializationFailed event; but the IsInitialized property is set to true. I noted the comment at the end of the below thread that states IsInitialized only indicates that the layer attempted to initialize - doesn't sound logical to state something is initialized when it isn't? http://forums.arcgis.com/threads/14244-...-about-layer-isinitialized-properties?highlight=IsInitialized I want the user to be able to click a button/some kind of control that will reinitialize the layer but this doesn't work, I am assuming it doesn't work because the logic in the feature layer is checking if the layer IsInitialized and if it is then the code does nothing? The above scenario can happen in our environment for a number of reasons, one being that the user has forgotten to log into the internet (yes we have to log in to use the internet 🙂 Any suggestions on how to initialize a feature layer that has previously failed initialization? Thanks Chris
... View more
10-27-2011
08:21 AM
|
0
|
7
|
2916
|
POST
|
have worked out what the issue is, the Normalize method expects the geometry to have a spatialreference set.
... View more
10-04-2011
02:37 AM
|
0
|
0
|
246
|
POST
|
Ok it works with a simple polygon, but if the geometry is a circle or a freehand line that has been closed to make a polygon it produces no results once the map has panned beyond the dateline.
... View more
10-04-2011
02:00 AM
|
0
|
0
|
246
|
POST
|
Hi I have set the Map.WrapAround property to true, the user can draw a polygon and the result of this is set as the FeatureLayer.Geometry property, FeatureLayer.Update() is then called. This returns the correct results. If the user then pans the original world frame a couple of times to the left or right passing the dateline and the process as above is completed the FeaturLayer returns no results. I have tried using the Geometry.NormalizeCentralMeridian() as suggested in the whats new section.. http://help.arcgis.com/en/webapi/silverlight/help/index.html#/What_s_new_in_2_2/0166000000m2000000/ Am I missing something obvious? Thanks Chris
... View more
10-04-2011
01:54 AM
|
0
|
2
|
486
|
POST
|
Hi Can you classify your data in your Map Document (MXD) and use a Dynamic Map Service or does the classification need to be dynamic and on the client? If dynamic and client side then you could take a look at the following link to get an idea of how to create a class that will allow you to classify your data...(I think this is part of GeoTools I believe it is opensource but check the licensing oh and its in Java but should be simple to convert to .Net) http://www.ccg.leeds.ac.uk/projects/medaction/medact2/medactionservlet/WEB-INF/classes/uk/ac/leeds/ccg/geotools/classification/NaturalBreaks.java Chris
... View more
07-14-2011
04:17 AM
|
0
|
0
|
523
|
POST
|
Have created a test app that excludes all of my project code, from this it appears that the issue only occurs when the FeatureLayer is bound to a FeatureDataGrid.
... View more
06-29-2011
12:34 PM
|
0
|
0
|
276
|
Online Status |
Offline
|
Date Last Visited |
11-11-2020
02:23 AM
|