|
POST
|
Jennifer, Thanks so much for all the help! That solved my problem for my graphic erase tool... maybe in the future Graphic and GraphicsLayer events will directly support touch too :). I still cannot get the MeasureAction to work though. It seems to be an issue with WPF, that Silverlight does not have. I recreated that Silvelright sample you linked to above in WPF and it does not work with taps, just clicks. I wonder if it is a similar issue to what I posted here: http://forums.arcgis.com/threads/21149-Slider-Inside-Of-Legend-Does-Not-Work-With-Touch-Screen-(Only-WPF) Thank you much!
... View more
01-17-2011
07:23 AM
|
0
|
0
|
1805
|
|
POST
|
Graphic.MouseLeftButtonUp doesn't fire on touch tap either (and its uses Microsoft's event args), so that didn't work 😞
... View more
01-13-2011
03:08 PM
|
0
|
0
|
1805
|
|
POST
|
I have slider bars on my Legend control just like the example: http://help.arcgis.com/en/webapi/silverlight/samples/start.htm#LegendWithTemplates These sliders work fine with the mouse but with touch they do not (they work in the Silverlight sample, but not in WPF). You can tap and select the sliders thumb, but you cannot drag it. After some investigation I found this is due to a ScrollViewer intercepting the drag gesture like this article here mentions: http://stackoverflow.com/questions/3258709/multi-touch-scrollviewer-eating-touch-events So first thing was to try and disable the Legends ScrollViewer by doing: ScrollViewer.HorizontalScrollBarVisibility="Disabled" ScrollViewer.VerticalScrollBarVisibility="Disabled" This did not work, scroll bars still come up. So then I used Expression Blend to get the template/style for the Legend control and I did the same to the TreeView control, still has scroll bars. I then tried putting this disable code on everything in the template that would accept it, still scroll bars... Any ideas on how to solve this issue? I ideally would like to keep the scroll bars and just get the slider to work if it has the focus, but disabling the scroll bars (at least the horizontal one) is an option too. Thanks a lot!
... View more
01-13-2011
02:02 PM
|
0
|
0
|
871
|
|
POST
|
I found another related issue too with my application on a touch screen: GraphicsLayer.MouseLeftButtonUp is an ESRI event, so as you said before it is not called with a touch... but I do not see any touch related events in GraphicsLayer so how can I handle this? I have an eraser tool on our graphic toolbar so with this tool, when you click on a graphic (hence the GraphicsLayer.MouseLeftButtonUp) it can then remove the graphic. Still havn't figured out why the measure works with the mouse and not the touch in the app either... still poking around with it though. Thanks for all the help so far! *EDIT* Looks like I might be able to hook up an event handler to each individual graphic... would be nice to just hook up to the graphic layer though
... View more
01-13-2011
06:24 AM
|
0
|
0
|
1805
|
|
POST
|
No, ToolbarItemClicked is hit with both the mouse and the touch... MeasureAction.Execute() is executed both ways. It�??s just that the measure action does not respond to map touches, just to map clicks. Kind of weird...
... View more
01-12-2011
06:19 PM
|
0
|
0
|
1805
|
|
POST
|
Both of these get hit... MeasureAction.Execute() gets set in a ToolbarItemClicked event handler from a class that is derived from ESRI.ArcGIS.Client.Toolkit.Toolbar. Also, if I use the mouse on the same touch machine, the measure works, but using the finger does not. Thanks!
... View more
01-12-2011
02:34 PM
|
0
|
0
|
2158
|
|
POST
|
That example does work for me... hmmmm, so why is mine different. I have my own derived measure action so I can invoke it programatically:
public class ExecutableMeasureAction : MeasureAction
{
public void Execute()
{
Invoke(null);
}
}
Then I setup the measure action property with this:
protected void InitializeMeasureAction()
{
if (Maps.Count > 0)
{
if (MeasureAction != null)
MeasureAction.Detach();
//Initialize
MeasureAction = new ExecutableMeasureAction();
MeasureAction.AreaUnit = ESRI.ArcGIS.Client.Actions.AreaUnit.Acres;
MeasureAction.DisplayTotals = true;
MeasureAction.DistanceUnit = ESRI.ArcGIS.Client.Actions.DistanceUnit.Feet;
MeasureAction.MapUnits = MapUnit; //Dependency Property
MeasureAction.MeasureMode = ESRI.ArcGIS.Client.Actions.MeasureAction.Mode.Polyline;
MeasureAction.FillSymbol = MeasureSymbol; //Dependency Property
MeasureAction.Attach(Maps[0]);
}
}
And then to invoke the measure action:
MeasureAction.Execute();
So I am launching the action in a much different way, but still not sure why this would be different with the touch input...
... View more
01-12-2011
01:46 PM
|
0
|
0
|
2158
|
|
POST
|
Awesome, thanks Jennifer... I can change from MouseClick to MouseLeftButtonUp, that is no problem. Thanks for that info... What about the measure action though? Any ideas why it is not detecting a click? I am programatically invoking the measure action, would that cause any issues? Thanks a ton! *EDIT* I take that back, I can't use MouseLeftButtonUp because I need the MapPoint, darn...
... View more
01-12-2011
01:19 PM
|
0
|
0
|
2158
|
|
POST
|
Jennifer, thanks a lot for the reply. I prefer not to have to subscribe to touch events if I can... Yeah, no mouse click is fired when touching/tapping the map... I can touch to perform a click on buttons and such, but not the map. So it seems that the "promotion to mouse events" is working for the WPF components, just not the map. This is a WPF application by the way, not Silverlight. Maybe I am missing a setting or flag somewhere? *EDIT* I just checked the "Pen and Touch" settings again on the Windows 7 touch screen computer. Under the "Pen" tab there is an entry that maps a single-touch to single-click, but on the "Touch" tab there is no entry for single-touch and no way to add it. But single-touch seems to work as a single-click in Windows itself... so is this a fixed mapping of the single-touch that is always set?
... View more
01-12-2011
12:17 PM
|
0
|
0
|
2158
|
|
POST
|
I am new to working with touch screens but we have a few and the touch gesters work great such as pan and zoom. We have a toolbar with a few tools such as an identify tool and a measure tool, etc... these are listening for the mouse click event on the map... What is the best way to handle both touch taps and mouse clicks? 1) For each tool we created do I need to handle both the MouseClick and the TouchUp events? 2) This wont work for the measure action though because that is an action (which has the clicking embedded), so how do we use the measure action with touch? Thanks a lot for any info! *EDIT* So in I tried this in one of my tools:
map.MapGesture += Identify_MapGesture;
...
protected void Identify_MapGesture(Object sender, ESRI.ArcGIS.Client.Map.MapGestureEventArgs e)
{
if(e.Gesture == GestureType.Tap)
{
ESRI.ArcGIS.Client.Map.MouseEventArgs mouseEventArgs = new ESRI.ArcGIS.Client.Map.MouseEventArgs();
mouseEventArgs.MapPoint = e.MapPoint;
Identify_MouseClick(sender, mouseEventArgs);
}
}
And it works pretty good...
... View more
01-12-2011
09:33 AM
|
0
|
21
|
11644
|
|
POST
|
I ended up just doing a QueryTask on the image service and that does support a TimeExtent, so then I get back the features and their attribute collection has the ObjectIDs...
QueryTask queryTask = new QueryTask(AsyncIdentifyItems[0].Url);
Query query = new Query();
query.TimeExtent = IdentifiedMap.TimeExtent;
query.OutFields.Add("*");
FeatureSet featureSet = queryTask.Execute(query);
MosaicRule mosaicRule = new MosaicRule();
if (featureSet != null && featureSet.Features.Count > 0)
{
List<Int32> fids = new List<Int32>();
foreach (Graphic graphic in featureSet.Features)
{
fids.Add(Convert.ToInt32(graphic.Attributes[featureSet.ObjectIdFieldName]));
}
mosaicRule.FIDs = fids.ToArray();
}
ImageServiceIdentifyParameters.MosaicRule = mosaicRule;
Hope that helps someone else until the identify supports the TimeExtent. Unfortunatly now I have a new problem in that the identify operation does not seem to support the mosaics transformations, i made a new post in the REST forum: http://forums.arcgis.com/threads/20948-Image-Service-Identify-Not-Obeying-Transformations Thanks again for the help!
... View more
01-12-2011
06:09 AM
|
0
|
0
|
929
|
|
POST
|
We have a NAD_83 mosaic dataset that points to a NAD_27 raster catalog. This mosaic dataset is served up as an Image Service on ArcGIS Server 10 SP1. The mosaic has a transformation set to NAD_27_To_NAD_83_NADCON and also defined is NAD_27_To_WGS_84_79_CONUS which we need if going to WGS_84 but I don't think it is really needed here. Anyway, visually in our Silverlight maps the image is displayed using the correct transformation, but when using the identify operation, it does not use it... The map is in WGS_84, so the geometry being passed to the identify operation is also WGS_84. Is this a bug that the identify is not using the transformation? Or maybe something I am doing wrong? It is clearly returning results like it is processing on NAD_27 data, because it is off by about 300 feet, which is what I expect with no transformation... If it was treated as NAD_83, it would only be off by less than a foot (which would be acceptable). Thanks a lot for any info!
... View more
01-11-2011
04:52 PM
|
0
|
2
|
1317
|
|
POST
|
Chris, Thanks a lot for the reply and confirming there is no TimeExtent parameter. I might just have to hold off on this functionality until the upgrade comes or actually, what I will probably just do is hard-code what the date fields should be (for now). Presenting all the date fields to some of our users might be quite confusing. Thanks a lot! I look forward to this feature!
... View more
01-11-2011
02:03 PM
|
0
|
0
|
929
|
|
POST
|
Is there no way to set the transformations used with the Project operation in a Geometry service? I have to project some things from NAD_27 to WGS_84 in our Silverlight application and the default transformation is not acceptable. Thanks a lot!
... View more
01-07-2011
06:44 AM
|
0
|
7
|
6980
|
|
POST
|
Ok, I solved that problem... it was indeed my colormap... the maping values were off by one. Now I am having some troubles working out identifying the pixel for only the currently visible raster (based off time). Would be nice if the image service identify took a time extent. Only way I can see to do this is in the mosaicRule to either set the FIDs to the visible raster or set the Where clause on the date fields. Problem with this is in the Silverlight app I do not have access to the visible rasters info or its time field names...
... View more
01-07-2011
06:36 AM
|
0
|
0
|
1727
|
| Title | Kudos | Posted |
|---|---|---|
| 1 | 10-24-2023 10:43 AM | |
| 1 | 10-02-2023 02:23 PM | |
| 1 | 11-16-2016 02:05 PM | |
| 1 | 07-05-2017 09:30 AM | |
| 15 | 11-19-2010 08:05 PM |
| Online Status |
Offline
|
| Date Last Visited |
05-01-2024
08:25 PM
|