POST
|
Hi, Is there a way to save draw (from draw widget) on AGOL? Thanks.
... View more
04-04-2022
05:10 AM
|
0
|
1
|
245
|
POST
|
Hi, I'd like to zoom in 10% more of the envelope in my layout. How can I do that ? I currently have LayoutProjectItem layoutItemLoc = Project.Current.GetItems<LayoutProjectItem>().FirstOrDefault(item => item.Name.Equals("PrintLayout"));
Layout layoutLoc = layoutItemLoc.GetLayout();
MapFrame mfLoc = layoutLoc.FindElement("myMap") as MapFrame;
Map mLoc = mfLoc.Map;
Envelope env = featLayer.QueryExtent();
mfLoc.SetCamera(env); Thank you!
... View more
11-04-2021
03:16 PM
|
0
|
0
|
241
|
POST
|
@JeremyWiles In my case, it'll loop through many polygons in query and create a label for each of them. using (var foundCursor = parcelLayer.Search(accountQf))
{
while (foundCursor.MoveNext())
{
using (var row = foundCursor.Current)
{
//The parcel is found. Get the center point to label at.
var shape = row as Feature;
var poly = shape.GetShape() as Polygon;
var maxY = poly.Extent.YMax + 10;
var maxX = poly.Extent.XMax + 10;
MapPoint maxPoint = MapPointBuilder.CreateMapPoint(maxX, maxY);
var textSymbol = await CreateBalloonCalloutAsync(ColorFactory.Instance.BlueRGB);
var textGraphic = new CIMTextGraphic()
{
Text = $"Comp {counter}",
Placement = Anchor.CenterPoint,
Symbol = textSymbol.MakeSymbolReference(),
Shape = maxPoint,
Leaders = new CIMLeader[] { new CIMLeaderPoint()
{
//for a graphics layer, the leader location is in map coords
Point = MapPointBuilderEx.CreateMapPoint(poly.Extent.Center.X,
poly.Extent.Center.Y)
}
}
};
graphicsLayer.AddElement(textGraphic);
... View more
10-28-2021
10:29 AM
|
0
|
1
|
1334
|
POST
|
Yayyyy! I got it. Thank yo very much @CharlesMacleod .
... View more
10-28-2021
10:05 AM
|
0
|
0
|
423
|
POST
|
Thanks @JeremyWiles . I tried what you suggested. No luck! 😞 Have you tried it ? Did you get the balloon ?
... View more
10-26-2021
12:42 PM
|
0
|
0
|
1371
|
POST
|
In Pro, if you want it to show the leader line , you can do right-click -> show/hide leader line but I'm unable to find that property in proSDK.
... View more
10-26-2021
11:10 AM
|
0
|
2
|
1379
|
POST
|
I tried balloonCallout.LeaderOffset = 20; but didn't see any changes. Is that the correct offset property you talked about ? Thanks @JeremyWiles .
... View more
10-26-2021
10:50 AM
|
0
|
0
|
1382
|
POST
|
All, Has anyone successfully created a balloon callout on graphics layer by codes ? I asked this question before with previous version of arcgis Pro. I was under the impression with version 2.8 I should be able to do it but no luck so far. Below is my codes. I got all other properties correct but NO callout arrow. Thanks in advance for your help. Not a callout _subjectTextSymbol = await CreateBalloonCalloutAsync(ColorFactory.Instance.RedRGB);
.
.
.
subjectLabelGraphic.Text = "Subject";
subjectLabelGraphic.Symbol = _subjectTextSymbol.MakeSymbolReference();
//Add the graphic label
graphicsLayer.AddElement(subjectLabelGraphic);
.
.
.
private static Task<CIMTextSymbol> CreateBalloonCalloutAsync(CIMColor textColor)
{
return QueuedTask.Run<CIMTextSymbol>(() =>
{
//create a text symbol
var textSymbol = SymbolFactory.Instance.ConstructTextSymbol(textColor, 11, "Corbel", "Regular");
//A balloon callout
var balloonCallout = new CIMBalloonCallout();
//set the callout's style
balloonCallout.BalloonStyle = BalloonCalloutStyle.RoundedRectangle;
//Create a solid fill polygon symbol for the callout.
var polySymbol = SymbolFactory.Instance.ConstructPolygonSymbol(ColorFactory.Instance.GreyRGB, SimpleFillStyle.Solid);
//Set the callout's background to be the black polygon symbol
balloonCallout.BackgroundSymbol = polySymbol;
//margin inside the callout to place the text
balloonCallout.Margin = new CIMTextMargin
{
Left = 5,
Right = 5,
Bottom = 5,
Top = 5
};
//assign the callout to the text symbol's callout property
textSymbol.Callout = balloonCallout;
return textSymbol;
});
}
... View more
10-26-2021
09:06 AM
|
0
|
12
|
1817
|
POST
|
The idea is to have it automated as much as possible for users. Users will open the app from a hyperlink in other app. When my app opens it's zoomed to the selected polygon (through URL parameter) . Now having multiple years to the app makes it tricky. Thanks.
... View more
10-21-2021
12:45 PM
|
0
|
0
|
490
|
POST
|
All. Is there a way I could use the URL parameter (ex: year ) to tell filter widget to pick the right layer to do the filter on ? Is it even possible ? Thank you.
... View more
10-20-2021
01:06 PM
|
0
|
4
|
541
|
POST
|
Thank you very much @GKmieliauskas . I actually wanted to remove all elements. I should use graphicsLayer.RemoveElements(graphicsLayer.GetElements()); instead of graphicsLayer.RemoveElements(graphicsLayer.GetSelectedElements());
... View more
10-15-2021
08:47 AM
|
0
|
0
|
738
|
POST
|
All, I'm trying to remove the graphics layer on map. Codes did go through graphicsLayer.RemoveElements(graphicsLayer.GetSelectedElements()); but nothing happened. My graphics layer is still there. Am I missing something? protected async override void OnClick()
{
//Get the graphics layer
var graphicsLayer = MapView.Active.Map.GetLayersAsFlattenedList().OfType<GraphicsLayer>().FirstOrDefault();
await QueuedTask.Run(() =>
{
//Remove existing graphicsLayer
if (graphicsLayer != null)
{
graphicsLayer.RemoveElements(graphicsLayer.GetSelectedElements());
}
}); Thanks!
... View more
10-14-2021
03:12 PM
|
0
|
2
|
801
|
POST
|
Hi @AlixVezina , Thanks for clarifying the Preset attribute action concept for me. I use the Comp Finder web appbuilder template to build an app for my business case. The logic is 1/ Users click on a hyperlink to open the map and zoom to subject parcel (subjectID and runID included in the url) https://myserver/Myapp/?find=123456789&run_id=20201210 I already got that part worked. 2/ My layer has subject parcels and many non subject parcels . Users can select any parcel to add that parcel as a comparable parcel for the subject (by editing the attribute values). Right now I have 3 fields for users to edit (reason to include, subjectID to tie with , runID to tie with) . Instead of having users to copy /paste the subjectID and runID from url to the textboxes, I'd like to have those values auto populated when Smart Edit widget opened. Hope that makes sense. Thank you
... View more
09-23-2021
12:12 PM
|
1
|
2
|
1949
|
POST
|
I tried but still failed to get it work in my case. My url is below. (I use Near Me widget to get to the subject polygon) ....../webappbuilder/?id=12&find=123456789 . Then I use Smart Widget to modify the attribute values of another polygon closed by. I need this (non-subject) polygon popup with pre-defined value of (the subjectID in url 123456789) in one of the field. Image is attached. In Smart Edit configuration, I created group and select the field that I want the the SubjectID value in url to go to. Must be something I missed or did wrong ? Thank you so much for your help. The video you sent me is super helpful but unfortunately I was unable to pull it through.
... View more
09-21-2021
09:59 AM
|
0
|
0
|
1951
|
Title | Kudos | Posted |
---|---|---|
1 | 09-23-2021 12:12 PM | |
1 | 07-23-2021 08:35 AM | |
1 | 05-10-2021 12:59 PM | |
1 | 05-05-2021 12:26 PM | |
1 | 11-16-2020 04:58 AM |
Online Status |
Offline
|
Date Last Visited |
04-04-2022
10:56 AM
|