POST
|
@Kristine-DanielaShepherdson I'm sorry for not able to explain things better. I use Graphics Layer in my codes. For many reasons, label doesn't work for me. Is there a way we can detect the zoom level and set the length accordingly? Thanks for your help. @Kristine-DanielaShepherdson wrote: If I understand correctly, you want the point symbol to turn into a line that will remain the same size. I have a lateral thinking solution to this. Use the Labeling properties of the feature: - go to symbology (for labels) - scroll down to "Callout" and select simple line - set the tolerance to 0 - go to "Position" Properties for the label select your desired line length ( by setting up a distance of "x" points/inches" - force the feature to label a space by adding " " in the label expression - lock label (so that no matter your zoom level, it will remain the same). 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 + 100; var maxX = poly.Extent.XMax + 100; MapPoint maxPoint = MapPointBuilder.CreateMapPoint(maxX, maxY); var textSymbol = await CreateBalloonCalloutAsync(ColorFactory.Instance.CreateRGBColor(230,0,169)); var textGraphic = new CIMTextGra0% at least it has proper length phic() { Text = "Subject", Placement = Anchor.CenterPoint, Symbol = textSymbol.MakeSymbolReference(), Shape = maxPoint, //Leaders is an array of CIMLeader - add a Leader point to show //the leader, remove Leaders to hide the leader. 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) } } }; //specify a symbol //var pt_symbol = SymbolFactory.Instance.ConstructPointSymbol(ColorFactory.Instance.RedRGB,3,SimpleMarkerStyle.Square); var pt_symbol = SymbolFactory.Instance.ConstructPointSymbol(ColorFactory.Instance.CreateRGBColor(230, 0, 169), 10, SimpleMarkerStyle.Square); //create a CIMGraphic var pointGraphic = new CIMPointGraphic() { Symbol = pt_symbol.MakeSymbolReference(), Location = poly.Extent.Center //center of map }; //Add the graphic label graphicsLayer.AddElement(textGraphic); graphicsLayer.AddElement(pointGraphic); }
... View more
12-29-2021
11:52 AM
|
0
|
0
|
301
|
POST
|
All. I'm drawing a leader line point to the center of my polygons. My issue is using map point will make my leader lines varies depending on the zoom scale. Is there any way I can make my leader lines look the same on screen regardless of the map scale? Thanks in advance. var shape = row as Feature; var poly = shape.GetShape() as Polygon; var maxY = poly.Extent.YMax + 1500; var maxX = poly.Extent.XMax + 1500; MapPoint maxPoint = MapPointBuilder.CreateMapPoint(maxX, maxY);
... View more
12-28-2021
08:35 AM
|
0
|
2
|
346
|
POST
|
All, I'm trying to pass URL parameters as pre-defined values for fields to be edited. I have these codes at the opening function. My issue now is it only populates the 1st time for the 1st record to be edit. If I want to edit more records the value won't stay. Any idea on how I could fix that? Thank you very much. onOpen: function () { 1333 if (this._userHasPrivilege === true) { 1336 if (this._userHasPrivilege === true) { 1334 //this.fetchDataByName('GroupFilter'); 1337 //this.fetchDataByName('GroupFilter'); 1335 this._workBeforeCreate(); 1338 this._workBeforeCreate(); 1336 //Activate the widget after some time to make sure the components are loaded 1339 //Activate the widget after some time to make sure the components are loaded 1337 setTimeout(lang.hitch(this, function () { 1340 setTimeout(lang.hitch(this, function () { 1338 this.widgetManager.activateWidget(this); 1341 this.widgetManager.activateWidget(this); 1339 }), 100); 1342 }), 100); 1340 } 1343 } 1344 ///////////////// inject subjectID and run_id /////////////////////// 1345 function getParameterByName(name, url = window.location.href) { 1346 name = name.replace(/[\[\]]/g, '\\$&'); 1347 var regex = new RegExp('[?&]' + name + '(=([^&#]*)|&|#|$)'), 1348 results = regex.exec(url); 1349 if (!results) return null; 1350 if (!results[2]) return ''; 1351 return decodeURIComponent(results[2].replace(/\+/g, ' ')); 1352 } 1353 1354 let acct = getParameterByName('find'); 1355 let run_id = getParameterByName('run_id'); 1356 let tb_acct = document.getElementById("dijit_form_ValidationTextBox_12"); 1357 let tb_run_id = document.getElementById("dijit_form_ValidationTextBox_13"); 1358 if(tb_acct !== null){ 1359 tb_acct.value = acct; 1360 tb_run_id.value = run_id; 1361 console.log("Here1",acct); 1362 console.log("Here2",run_id); 1363 } 1364 //////////////////////////////////////////////////////////////////////////
... View more
09-28-2021
09:29 AM
|
0
|
0
|
354
|
POST
|
Hi, Is there a way for Smart Editor widget to fire a sql stored procedure to update a sql table in another server? I don't need to get anything back from that table. I just need the table to be also updated with the same values users enter using Smart Editor. Thanks in advance for your help.
... View more
09-28-2021
05:11 AM
|
1
|
0
|
214
|
POST
|
I tried but failed to get it worked in my case. My url is like 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 polygon popup with pre-defined value of (the subjectID in url 123456789) In SmartEdit widget, I created groupName "find" to match with the word "find" in url. I must be doing something wrong ? Thank you very much Alix for all your help.
... View more
09-22-2021
09:39 AM
|
0
|
4
|
1960
|
POST
|
Thank you so much @AlixVezina . I'm still having trouble getting my field configured to take the variable from the url. I'll watch the video again and keep trying. I'll keep you posted of how it's going.
... View more
09-17-2021
10:17 AM
|
1
|
7
|
2040
|
POST
|
All, I'm looking for a way to populate a field in smart editor (edit attribute field of existing feature) with a string (which will come from the URL parameter). I'm not familiar with customizing widget but this is something I have to make it happen to keep my job so any help and guidance is greatly appreciated. Thanks
... View more
09-15-2021
11:10 AM
|
0
|
10
|
2308
|
POST
|
Sounds good @RPGIS! I'll definitely play around with those ideas. Thanks a bunch.
... View more
07-29-2021
08:19 AM
|
0
|
1
|
2017
|
POST
|
My issue is users doing filters on the layer so multiple layers wont work for me unless there's a way to apply filters on both layers. Thanks @RPGIS .
... View more
07-29-2021
04:32 AM
|
0
|
3
|
2021
|
POST
|
Hi Robert, Is there a widget for web app builder out there for me to use ? My business case is users apply filters to get polygon features they want but when they zoom out too far those polygons are hard to see on the map. I'm thinking about having those features displayed as points at a certain map scale. Any idea or point of direction is greatly appreciated.
... View more
07-28-2021
05:47 AM
|
0
|
5
|
2032
|
POST
|
Hi, Is it possible to create points from polygons on the fly and display them on the web map ? For example, if I go to style -> Choose attributes -> Expression, then I use the codes below to get the centroid. I click on "Test" and see it actually returns the centroid but I have no idea how to make the point returned show up on my map. Any help is greatly appreciated. var vgeometry = Geometry($feature); Console('\nvgeometry:' + vgeometry + 'dog' ); //var vline = Polyline(vgeometry); //Console('\nvgeometry:' + vgeometry + 'dog' + '\nvline:' + vline + 'bird'); var vcentroid = Centroid(vgeometry); //Console('\ncent:' + vcentroid + 'cat'); var vpoint = Point(vcentroid); //Console('\npoint:' + vpoint); console('Monkey'); console(vpoint); return vpoint;
... View more
07-27-2021
02:07 PM
|
0
|
8
|
2079
|
POST
|
Hi, Anyone has any idea or workaround on how to fix the issue that I currently have with selected polygons hard to see when users zoom far out? Using multiple layers doesn't work for me cuz I do filters on my layer so not all of them displayed. Users don't like the idea of converting polygon to point because they want to see the polygon outlines when zoomed in close. They basically want polygon look at certain scales and point like look at others. Is it possible ? Any help is greatly appreciated.
... View more
06-17-2021
06:34 AM
|
0
|
0
|
258
|
POST
|
All, Could you please point me to the page/place that has customized widgets from other people like eSearch from Robert and documents on how to implement them. Thank you!
... View more
01-28-2021
11:14 AM
|
0
|
1
|
432
|
POST
|
Hi, In my case, users select either 1 item or all items. You can check out the this link for suggestion on how to do multiple selection. Sorry I couldn't be more helpful. c# - Selecting multiple Listbox items through code - Stack Overflow
... View more
01-19-2021
06:58 AM
|
0
|
0
|
795
|
POST
|
Hi Uma, Silly me. I was so certain I had XMax there. Thank you very much!
... View more
09-16-2020
07:43 AM
|
0
|
0
|
760
|
Title | Kudos | Posted |
---|---|---|
1 | 08-21-2020 05:42 AM | |
1 | 09-28-2021 05:11 AM | |
1 | 09-17-2021 10:17 AM | |
1 | 05-19-2020 04:39 AM | |
1 | 09-21-2018 02:06 PM |
Online Status |
Offline
|
Date Last Visited |
01-19-2022
01:25 PM
|