POST
|
Hello, I'm am trying to create points using the Javascript 3.x API. Can I not apply edits on a layer that participates in a geometric network? Apply Edits works fine on a non-geometric network layer, but when I try to create a point on a network layer, I get "Unable to Complete Operation".
... View more
08-08-2019
01:16 PM
|
0
|
6
|
1165
|
POST
|
Ah, I see what you're saying. I made the changes and got it going. Thank you very much!!
... View more
06-05-2019
06:01 PM
|
0
|
0
|
984
|
POST
|
Robert, Thanks. I can now create a dialog box programatically, and set the content as "this.myTemp" to get the template from Widget.html. I guess I'm confused on how to access the button though, so I can add functionality to it. I could call the following "btn1" from my JS, but as soon as I add the data-dojo-type="dijit/form/button" on there, I can no longer call it. But if I leave it off, it's no longer a "dojo/button" and it loses it's style. Does that make sense? <div data-dojo-attach-point="myTemp" title="My Title">
<button class="btn" data-dojo-attach-point="btn1"></button>
</div>
... View more
06-05-2019
09:23 AM
|
0
|
2
|
984
|
POST
|
Hello, I'm working in WAB 2.12. I'm not sure why this wouldn't work, and I was hoping someone could point me in the right direction. I want a dialog box upon opening the widget, and I'm placing the button markup for the dialog box in widget.html, but i thought you were supposed to be able to reference the HTML via the data-dojo-attach-point. When my dialog box opens, it's empty. Do you know what I'm missing? Widget.html <div>
<div data-dojo-attach-point="myTemp" data-dojo-type="dijit/Dialog" title="My Title">
<button class="btn" data-dojo-type="dijit/form/Button" type="button">Button1 </button>
<button class="btn" data-dojo-type="dijit/form/Button" type="button">Button3</button>
<button class="btn" data-dojo-type="dijit/form/Button" type="button">Button2</button>
</div>
</div> and Widget.js define(['dojo/_base/declare',
'dojo/_base/lang',
"dijit/_WidgetsInTemplateMixin",
'jimu/BaseWidget',
"dijit/form/Button",
"dijit/Dialog",
"dojo/dom",
'dojo/on',
"esri/lang",
"dojo/domReady!"
],
function (declare,
lang,
_WidgetsInTemplateMixin,
BaseWidget,
Button,
Dialog,
dom,
on,
esriLang,
) {
return declare([_WidgetsInTemplateMixin, BaseWidget], {
baseClass: 'jimu-widget-myWidget',
onOpen: function () {
this.inherited(arguments);
console.log('onOpen');
this.myDialog = new Dialog({
title: this.title,
content: this.myTemp
})
this.myDialog.show();
},
... View more
06-04-2019
09:48 AM
|
0
|
4
|
1171
|
POST
|
Ok thanks, Just so I'm not totally going insane here, looking at my code, is there any thing that jumps out at you with the onOpen method? I keep getting this error, and I don't understand why. TypeError: Unable to get property 'on' of undefined or null reference <script> define(['dojo/_base/declare', 'jimu/BaseWidget','dojo/on',"dojo/domReady!"], function(declare, BaseWidget, on) { return declare([BaseWidget], { baseClass: 'jimu-widget-myWidget', onOpen: function(){ myFL = this.map.getLayer("ConstructionSvcs_scratch_6492_6"); myFL.on("click", function(e){ console.log(e) }) }, }); }); </script>
... View more
05-17-2019
01:45 PM
|
0
|
2
|
545
|
POST
|
Thanks Robert, I was trying that before, the only thing I can think of is that I'm not getting the right ID. in getLayer(ID), would it be "6" here? or "Taxlots"? Neither work, but I want to make sure I'm at least getting the right one. Does it matter that it's in a group layer, and it's a child of Landbase?
... View more
05-17-2019
12:05 PM
|
0
|
4
|
545
|
POST
|
I'm having a little trouble accessing my feature layer in the Web Appbuilder app. If I did the following outside of WAB, just in a testing JS 3.x environment, it would work. <script> var myFL = new FeatureLayer("https://blahblah/MapServer/6", { mode: FeatureLayer.MODE_AUTO, outFields: " ", id: "myParcels" }) map.addLayer(myFL); myFL.on("click", function (evt) { var geom = evt.graphic.geometry; console.log(geom) </script> But in WAB, myFL already exists in there, so if I do map.addLayer(myFL), it's adding it a second time, but that's the only way I can successfully return anything on a click event. If I do the following in WAB, not adding the layer (because it's already in the map and I don't want it twice), I can't return anything on the click event. I'm not sure what I'm missing that I can't return anything?? I feel like I've tried everything to access this layer, I've tried map.getLayer(id), and that didn't work. Not sure why it isn't working... <script> { return declare(BaseWidget, { //Derive from BaseWidget. baseClass: 'jimu-widget-myWidget', isActive: true, startup: function() { this.inherited(arguments); this.myFL = new FeatureLayer('https://blahblah/MapServer/6',{ outFields: ["*"]}) }, onOpen: function(){ this.myFL.on('click', function(evt){ var geom = evt.graphic.geometry; console.log(geom) }) } }); }); </script>
... View more
05-17-2019
09:38 AM
|
0
|
6
|
664
|
POST
|
Good to know, Robert. I'll pick a different theme or just deal with the behavior. I really appreciate it!
... View more
09-07-2018
01:14 PM
|
0
|
0
|
232
|
POST
|
Thanks Robert. This is what it looked like before I added my widget to the screen. We didn't want the "My Location" widget, so I just made it visible: false and it disappears. And then I moved my widget into the void left by the "my Location" widget. But maybe that's the issue, that just because "My Location Widget" isn't visible, it's still there? But still, even if I move my widget down and make it the bottom widget, it still "pops off" when resizing the browser.
... View more
09-07-2018
09:06 AM
|
0
|
4
|
864
|
POST
|
I just made them visible: false. Should my widget be grouped with the rest of these off panel widgets? Maybe that's an issue? You see how mine is in it's own section?
... View more
09-06-2018
04:27 PM
|
0
|
6
|
864
|
POST
|
Even if I turn all the default ones off, my widget still moves.
... View more
09-06-2018
04:08 PM
|
0
|
8
|
864
|
POST
|
Hmm, it doesn't seem to make a difference -- it gets popped off either way. Almost like there is a limit to how many icons can be stacked.
... View more
09-06-2018
03:33 PM
|
0
|
10
|
864
|
POST
|
Hello. I have an onscreen widget that I am using with the plateau theme and the widgets are stacked top to bottom on the left hand side of the screen. I found out that when I resize the browser window (making it narrower or even reducing the height of the browser) my widget icon/container shoots across to the right side of the screen. In the config.json, I have the position set to position: { top: 212, left: 7, relative to: map } What else might need to be done to keep the widget from moving clear across the screen when I resize the browser window.
... View more
09-06-2018
01:43 PM
|
0
|
12
|
1309
|
Title | Kudos | Posted |
---|---|---|
3 | 04-15-2021 11:58 AM |
Online Status |
Offline
|
Date Last Visited |
3 weeks ago
|