|
POST
|
Hello, I have a fairly complex MapTip (includes buttons and also queries related records when activated). Now I'm giving the users the option to have either a MapTip on hover or a InfoWindow on click. I would like the output to be seemless to the end-user (same result with different ways to get there). Can a MapTip and a InfoWindow share the same UI element?, I've looked at examples and the InfoWindow can utilitize a 'ContentTemplate' but the MapTip doesn't have this property. anyone else tried this or have any suggestions? Thanks,
... View more
03-26-2014
09:57 AM
|
0
|
2
|
907
|
|
POST
|
Here is another example, using the 'MAP_ONLY' I should clarify, the brown are polygon 'labels', not text or anno, and I can assure you, there is only one label of each on the screen. surely I can't be the first to run into this......... any help would be appreciated, thanks
... View more
02-25-2014
09:27 AM
|
0
|
0
|
501
|
|
POST
|
Can anyone tell me if there is a way to throttle down the re-sampling that occurs when PrintTask is executed. It is producing way too many text elements per object. Have a look at the PDF attached. There should only be one brown and one blue text element per polygon I can understand what it's doing (much like when we cache), but the result is a little overkill and I'm wondering if there is any setting that can be changed to avoid this. I have tried the different MapOptions with different extents and scale, but the results are the same regarding too much text. Thanks Dave
... View more
02-19-2014
11:37 AM
|
0
|
1
|
697
|
|
POST
|
sorry not to help,.......but how do you get access to the ESRI.ArcGIS.Samples.RotatingTextSymbol thanks
... View more
01-31-2014
01:24 PM
|
0
|
0
|
414
|
|
POST
|
Hello all, I got this working so here is my review. The help doc that finally hit the mark is this http://resources.arcgis.com/en/help/arcgis-rest-api/index.html#/Accessing_services_provided_by_Esri/02r300000268000000/ The main issues I had were that I was trying to authenticate with the wrong service. Most proxy examples are using this URL to get the token, (and this may still be possible but I didn't have luck with it) https://www.arcgis.com/sharing/genrateToken The example above, for OAuth uses this token generator https://www.arcgis.com/sharing/oauth2/token I also had a harder look at the code within the proxy and realized that it had to be adjusted to accommodate the new URL, basically just adjust the query string that calls for the token (stuff like changing 'username' to 'client_id' to match the url in Step7 of the help doc above) Something else that messed me up when someone tried to explain it to me was the (Step 3) Create New Application. The process just didn't sound logical to me and I was fighting to know how it related to my local app. This 'New Application' has 100% nothing to do with your local application, it is just an ID and secret generator tied to your AGOL account. It should be renamed to 'OAuth Credential Generator' period. I also forgot to mention that I was first trying this with a small html JavaScript project, but these successful steps were with my Silverlight app (which was my final goal anyways) but hopefully this is still relevant to this forum. Here is some code too (I added 'client_id' & 'client_secret' attributes to the 'SeverItem' class) proxy.config <serverItem url="http://route.arcgis.com/arcgis/rest/services" matchAll="true"
client_id="<client_id>" client_secret="<client_secret>" permitted_referer="http://localhost"
tokenUrl="https://www.arcgis.com/sharing/oauth2/token" /> proxy.ashx if (theToken == null)
{
string tokenServiceUrl = string.Format("{0}?client_id={1}&client_secret={2}",
si.TokenUrl, si.Client_id, si.Client_secret);
int timeout = 60;
if (si.Timeout > 0)
timeout = si.Timeout;
tokenServiceUrl += string.Format("&expiration={0}", timeout);
DateTime endTime = DateTime.Now.AddMinutes(timeout);
tokenServiceUrl += "&grant_type=client_credentials"; I split the returned token to get just the token string, I'm sure there is a better way to do this but this was the first time dealing with a json response if (string.IsNullOrEmpty(token))
token = generateToken(uri);
string[] sTokenParts = token.Split('"');
if (!String.IsNullOrEmpty(token))
{
if (uri.Contains("?"))
uri += "token=" + sTokenParts[3]; //token; take home lesson, never assume all proxy code is plug and play, they must be adjusted for your purpose.
... View more
12-16-2013
07:04 AM
|
0
|
0
|
1078
|
|
POST
|
with the depreciation of tasks.arcgisonline this month we are trying to switch to the route.arcgis.com instead, this is now a payservice so we're trying to follow the proxy example from GitHub. https://github.com/EsriCanada/proxy-oauth https://github.com/EsriCanada/application-boilerplate-driving-directions-js There are so many places to change setting that I have completely tied myself in knots. First off: Is it possible to pass our AGOL credentials so public users will never have to log-in? If NOT please tell me! If so, what settings do I change. There are places in: boiler/config/default.js proxy/proxy.config proxy/web.config Do I need to hardcode my AGOL username / password somewhere? I've been told I need to register my app to get an appID and secret although this is strange to me because it is a local app so why/how do I register an app on my server with with AGOL What do I use for the referer?, keep localhost or my ISS root or application path or server name/IP I feel like there are many ways to use a proxy and each example is different although much of the terminology is being repeated when it shouldn't be. As mention at the top, the old routing is disappearing so I expect there will be high demand for a clear answer. Thanks
... View more
12-12-2013
01:19 PM
|
1
|
3
|
3218
|
|
POST
|
if this is the case, it would be kind of ESRI to report this as a breaking change for Silverlight 4. also, if you've been using VS2010, plan to upgrade to VS2013, because (as stated in the link above) 'Blend Preview is no longer available, use blend with VS2012 SP2+ or VS2013' (to get 'Microsoft.Expression.Interactions back) fun times
... View more
11-26-2013
12:20 PM
|
0
|
0
|
1099
|
|
POST
|
Sorry, no help, but I'm also looking for a similar solution. We are required to upload data to another system via an Atom RSS feed. How do we go from polygon (native in ArcMap via ModelBuilder, or from REST point on Server via some C# magic....) to an Atom RSS feed?....
... View more
11-01-2013
10:22 AM
|
0
|
0
|
1003
|
|
POST
|
Hello, From the RSS feed API reference it mentions that "If you are displaying the feed on top of a map in a different projection, they must be reprojected manually when the graphics collection gets features added. " can someone please describe how to do this. I see a property for 'ProjectionService', but I'm not sure what to do with it. Thanks,
... View more
10-22-2013
10:44 AM
|
0
|
0
|
528
|
|
POST
|
maybe i can put this in a more generic way. forget the 3.1 issue, I'm sure I have this messed up from the start is there a proper programming procedure in which I can: 1) create my own user control (yes) and 2) utilize the WindowPanel.xaml as its main element basically I want a bunch of WindowPanels but as their own user control with their own code-behind. we've done this in the past, but I don't feel like our technique was right and now VS is throwing all sorts of design errors (that it wasn't before) maybe the VS debugger is picking it up now, but it wasn't crucial enough to make it fail before?...
... View more
09-27-2013
01:51 PM
|
0
|
0
|
263
|
|
POST
|
Hello, I've finally got around to upgrading to API v3.1. Is there something I should know about regarding the Window Panel? none of my User Controls based off of the WindowPanel will initialize. trying to fix it I opened a blank StandardMapApp and copied the new WindowPanel from there into my old code, but still have probelems. I have also ensured that the ESRI dll's were readded Self taught programmer a few years ago so I'm sure its something I did wrong two years ago, but if I'm missing something that I should know about with this new API, please help out. Dave
... View more
09-26-2013
10:53 AM
|
0
|
1
|
586
|
|
POST
|
anyone else experienced this? as soon as I implement label classes, my MapService crashes (10.1). I've been doing my due dilegence, and this is a test service with only two layers, all working fine and labelling fine when labelling everything. add a simple label class and the MapService crashes. bug?....
... View more
07-24-2013
02:55 PM
|
0
|
0
|
1095
|
|
POST
|
Okay, we think we have the problem tackled, here is some code to turn on parent items when a subitem is clicked on. XAML for Legend (Sublayers) <!--Layers within MapLayers--> <esriToolkit:Legend.LayerTemplate> <DataTemplate> <CheckBox x:Name="chkLayerItemVis" Content="{Binding Label}" IsChecked="{Binding IsEnabled, Mode=TwoWay}" IsEnabled="{Binding IsInScaleRange}" Click="chkLayerItemVis_Click" Tag="{Binding SubLayerID}"> </CheckBox> </DataTemplate> </esriToolkit:Legend.LayerTemplate> c# for chkLaterItemVis_Click and turnOnParents private void chkLayerItemVis_Click(object sender, RoutedEventArgs e) { // Goal is to set visibility of parent Layers if child layer is checked. CheckBox chk = sender as CheckBox; // Only concerned if they checked the layer 'on' if (chk.IsChecked == true) { // At this time - we know the 'name' and 'SubLayerID' (bound SubLayerID to chk's 'Tag' in XAML) of the checked layer (child) // this will result in all parent layers being turned on, if they have a child with the same name and ID as // what was clicked. // // Because we are using name AND ID (and IDs don't double up), this will only happen if multiple DynamicLayers layers have the same 'name / ID' child combos // // you can do the same with only 'name', but parents will turn on if they have a child with the same name as what was clicked // string NameOfLayerChecked = chk.Content.ToString(); int IDOfLayerChecked = (int)chk.Tag; foreach (Layer l in MyMap.Layers) { // Only concerned about Dynamic Layers - only ones that would be checked. if (l is ArcGISDynamicMapServiceLayer) { ArcGISDynamicMapServiceLayer dl = l as ArcGISDynamicMapServiceLayer; foreach (LayerInfo vLayerInfo in dl.Layers) //if (NameOfLayerChecked == vLayerInfo.Name) // optional - use name only, see note above // if (NameOfLayerChecked == vLayerInfo.Name && IDOfLayerChecked == vLayerInfo.ID) { // We have found a Layer in the Dynamic Map Service that matches // the name and ID of the layer box checked // Set the root to on dl.Visible = true; // set layerID and pass on int turnedOnLayerID = vLayerInfo.ID; turnOnParents(dl, turnedOnLayerID); } } } } } private void turnOnParents(ArcGISDynamicMapServiceLayer pLayer, int pChildID) { ArcGISDynamicMapServiceLayer dl = pLayer as ArcGISDynamicMapServiceLayer; int tParentLayerID; int tID; foreach (LayerInfo vLayerInfo in dl.Layers) { // Check to see if there are any sublayers if (vLayerInfo.SubLayerIds != null) { // Loop through Sub Layers - and see if any of them have our child for (int q = 0; q < vLayerInfo.SubLayerIds.Length; q++) { tID = vLayerInfo.SubLayerIds ; if (tID == pChildID) { // We found a Parent that has our child // set visibility tParentLayerID = vLayerInfo.ID; dl.SetLayerVisibility(tParentLayerID, true); // Check to see if Parent has Grandparrents... turnOnParents(pLayer, tParentLayerID); } } } } } I hope others find this helpful, it has been working great for us
... View more
04-25-2013
09:23 AM
|
0
|
0
|
523
|
|
POST
|
Thanks for the reply, This is some cool functionality, but a little overkill for the goal I'm trying to accomplish. No need to turn all on or off from the parent. all i really need is some code to detect what parent the sublayer is part of and matched it's visibility (checked state). from the REST point each layer clearly states what the parent ID is, but a little harded to track down from the legend control. I tried to use some of your C# in the example for detecting parent layers but i don't think it was intended for that anyways, any more hints would still be appreciated. Thanks
... View more
04-18-2013
02:56 PM
|
0
|
0
|
523
|
|
POST
|
I am looking for some code to propogate Legend Selection up the Legend tree. I've been experimenting with the LayerItemViewModel and LegendItemViewModel and LayerItems / Layers etc etc but can't quite get it. any help would be great. just to clarify, when a user opens many tree nodes and finally finds the layer they want and click it, now they have to go back up the tree and turn every parent on manually to actually see the layer. Of course many don't realize this and say 'nothing shows up, where is the data...' Many requests to improve this functionality. Thanks,
... View more
04-17-2013
12:42 PM
|
0
|
3
|
865
|
| Title | Kudos | Posted |
|---|---|---|
| 1 | 05-02-2016 03:08 PM | |
| 2 | 02-02-2016 02:25 PM | |
| 1 | 03-08-2017 09:24 AM | |
| 2 | 05-23-2018 11:24 AM | |
| 1 | 09-24-2020 05:58 PM |
| Online Status |
Offline
|
| Date Last Visited |
02-08-2023
06:01 PM
|