POST
|
I am having an issue with the sign in page that is generated if/when a user clicks the link to a created Site, in the event the user is not currently logged into Portal. This is the case even if or when the user is an administrator and added to the Sites Admin group. The problem is the button in the login page that is generated does not activate a function, and the console error in chrome is Uncaught TypeError: Cannot read property 'clientKey' of null at u.gatewaySignin (opendata-ui-834ba49e1f3cbccc6d14184a2e4ee040.js:60) at u.w (vendor-e045f76605d11474c6326ad1d1207b60.js:4041) at h (vendor-e045f76605d11474c6326ad1d1207b60.js:5174) at N.trigger (vendor-e045f76605d11474c6326ad1d1207b60.js:5346) at u.send (vendor-e045f76605d11474c6326ad1d1207b60.js:3974) at u.send (vendor-e045f76605d11474c6326ad1d1207b60.js:4205) at vendor-e045f76605d11474c6326ad1d1207b60.js:3059 at o.EMBER_IMPROVED_INSTRUMENTATION.e.flaggedInstrument (vendor-e045f76605d11474c6326ad1d1207b60.js:3606) at vendor-e045f76605d11474c6326ad1d1207b60.js:3059 at e._run (vendor-e045f76605d11474c6326ad1d1207b60.js:2480) This is an image of the page from which the error is generated Clicking the button generates the error. If however the user is logged into the Portal before clicking the link to the site, the page opens as expected without a login screen. Our Portal is behind a firewall, thus I can't provide a direct link. Seems like an ember/open data framework issue related to Sites. Thanks, Jim Faron UNS Energy Tucson, AZ
... View more
08-22-2018
12:26 PM
|
0
|
7
|
1454
|
POST
|
The problem is that iOS does not process the contextmenu mouse event, as both Android and Windows do. Unfortunately unless you are using the Bower build, there is no current fix for the problem, as it requires a significant hack to the menu.js in dojo's digit directory. The dojo menu.js code that won't work in iOS: on(cn, delegatedEvent(this.leftClickToOpen ? "click" : "contextmenu"), function(evt){ The fix requires a separate section of code for ios. First bring in the dojox/gesture/tap module to menu.js. Then as follows: //create a var for tap.hold with a long enough hold time to prevent from being activated on swipe gesture var myTap = new dojox.gesture.tap.Tap({holdThreshold: 1000}); //separate code for ios only: if(has("ios")){ var hammertime = Hammer(dom.byId("mapViewDiv_root")); hammertime.get('press').set({ time: 1000, pointers: 1, threshold: 9 }); var self = this; hammertime.on("press", function (e) { var x, y; x = e.center.x; y = e.center.y; self.myX = x; self.myY = y; }); var doConnects = lang.hitch(this, function(cn){ var selector = this.selector, delegatedEvent = selector ? function(eventType){ //the folowing is necessary to keep iOS from freezing any other click events on the map, due to using dojox/gesture if(cn.className == "esriMapContainer"){ cn.dojoClick = true;} //end add return on.selector(selector, eventType); } : function(eventType){ return eventType; } //self= this not needed here since it is declared above // self = this; return [ on(cn, delegatedEvent(this.leftClickToOpen ? "click" : myTap.hold), function(evt){ evt.stopPropagation(); evt.preventDefault(); //need to this to clear the element for other click events.Not sure why at this point: query(dom.byId("mapViewDiv_root")).on(myTap.hold, function(e){e.preventDefault()}); //need to allow other node menu events to work as usual, thus separate code for the context menu if(evt.target.nodeName == "svg"){ self._scheduleOpen(this, iframe, {x: self.myX, y: self.myY}, evt.target); }else{ self._scheduleOpen(this, iframe, {x: evt.pageX, y: evt.pageY}, evt.target); } //end altered/added code: the rest can be taken as written in menu.js. I use an 'else' statement to move from 'has(ios)' to the original code for all other devices. Hammer.js is necessary as documented elsewhere due to dojox/gesture not returning screen coordinates. I hope this helps someone. Took me a few days to figure everything out. Unfortunately, I'm getting used to this.
... View more
06-14-2017
11:15 AM
|
0
|
0
|
722
|
POST
|
I have a similar question as asked previously in the forum here. I have implemented the context menu in an app and it works with long press on android, but not on ios. I tried the esri context menu sample and it too fails on ios. I know that ios handles mouse events natively, and they don't bubble by default, but I have followed all the published advice, including adding 'pointer: cursor; to all nodes in the DOM, and created empty mouse events (click handlers) in the code, but I can only get alerts to work when inserted into the click handlers that I create, using touchstart or mousedown as the event, and even tried to use 'contextmenu' event, but that doesn't work on ios either. I can't tell how far the long press gets: It seems to be a problem with dojo menu.js, but I have not had the opportunity yet to debug an ipad on a mac (I use Windows at work, and the Chrome simulator cannot simulate native ios mouse events: the context menu works fine in the Chrome simulator). The gist of the problem is described here and here and here. Since the esri sample doesn't seem to work on ios either, I wonder if the esri javascript api supports ios fully or even well? An app that does not work on iPad is not going to be successful. I hope there is a work-around. I am using the bower build, so I do have access to the menu.js, if it is necessary to adjust anything there. Any help would be greatly appreciated. Thanks, Jim Faron
... View more
06-06-2017
04:51 PM
|
0
|
1
|
2842
|
POST
|
Dijit/form/Select dropdown will not scroll on ios. I know that Dojo recommends using dojox mobile, but tablets are 'tweeners' in today's world, and this should not be a problem or issue. I would hope that Esri, as a paying customer to Dojo, could perhaps put some weight on this to get Dojo to fix the problem, or suggest a reasonable code adjustment to work around the issue. I have looked at select.js and _list.js (I am using the Bower build), but can't come up with any reason why scroll fails on ios. I have set the maxHeight to -1 as they suggest in the documentation, but the dropdown still does not scroll on ios. I even changed through css the .dijitPopup to overflow:scroll (the element.style defaults to overflow:visible until the user clicks to open the drop-down, wherein it changes to overflow-x: visible, overflow-y:scroll). I know I could use native select, but that destroys the validation that I would like to use. Has anyone else encountered and solved this? Anyone from Esri have a suggestion, or solution? Thanks, Jim Faron
... View more
01-10-2017
12:46 PM
|
0
|
0
|
674
|
POST
|
Rene, I posted my comment before reading your response. The build report did help me as you indicated. Custom code is bit tricky to make work: perhaps a simple sample in the documentation might help. What I did specifically was to add a map to my app/widgets directory, and referred to it in the packages array: packages: [
// 'app' is a sample path for your application
// set this accordingly
'app',
'widget',
'dijit',
'dojo',
'dojox',
'dstore',
'dgrid',
'xstyle',
'put-selector',
'esri', {
name: 'moment',
location: 'moment',
main: 'moment',
trees: [
// don't bother with .hidden, tests, min, src, and templates
[".", ".", /(\/\.)|(~$)|(test|txt|src|min|templates)/]
],
resourceTags: {
amd: function(filename, mid){
return /\.js$/.test(filename);
}
}
}
],
map: {
'*': {
widget: "app/widget"
}
}, And in the include: include: [
// include the app, set accordingly for your application
'app/main',
'widget/SaraWidget',
'widget/SchoolsWidget',
'widget/utils/PopupExtended',
// dependencies of esri/map that will be requested if not included There were other syntax and argument errors that I fixed as well. Again, it was confusing in that the errors did not cause problems in dev environment, but all is well, at least for now!
... View more
06-08-2016
08:58 AM
|
0
|
0
|
454
|
POST
|
On further review, I used the build-report.txt file that dojo outputs to the dist directory to get to the source of the problem. For others who may encounter this, the file is huge, so it worked for me to copy and paste it into Excel, then do a search for "Missing dependencies", as well as a search for "error(" . I had to adjust my build.profile to create a map to my widget directory, include it in packages, and then add it the include array in 'dojo/dojo'. What is peculiar is that the problems that I had with build did not cause the dev environment to fail to load the project.
... View more
06-08-2016
08:42 AM
|
0
|
0
|
454
|
POST
|
I’m having an issue with the Dojo build system with my custom widgets. The dojo build creates uncompressed versions of the custom widgets in the Dist folder, but not compressed. The uncompressed js file has the Template.html at the top under a ‘require({cache:{‘url: app/widget/templates/%WidgetName%.html’ with a compressed version of the template, and then underneath that, the uncompressed widget. It does create a %widgetname%.js file, but with only "//>>built" in the file at the top. I don’t think the problem is with my directory structure or with the build.profile, since it is copying the files, just not compressing the js for those widgets. Am I missing something with custom code and how build system works? All works fine in my dev environment. The build runs in command prompt, and finishes with very generic errors that are not specific to why the build fails to complete. It seems that everything else works as expected with the build, just not my custom widgets. Thanks, Jim Faron Katy ISD Katy, TX
... View more
06-07-2016
02:43 PM
|
0
|
3
|
1677
|
POST
|
Can someone tell me the purpose of having a built.html along with an index.html in the src folder? One file has the dojoConfig set up (index.html) but it is the built.html that is configured in gruntfile.js to be copied to the dist folder. I don't find any documentation on this in the instructions or files. Thanks! Jim Faron
... View more
05-23-2016
01:26 PM
|
0
|
1
|
1262
|
POST
|
I am using a filter for a simple dgrid in an application (code below extracted for simplification): var value = (newValue + "").replace(/[.?*+^$[\]\\(){}|-]/g, "\\$&");
queryNameVal[queryProp] = new RegExp(value, "i");
grid.eschoolsList.set("query", queryNameVal); This works, but it finds all results for the input value, regardless of where it is in the data, in this case, names of schools. Thus if the data has "Randolph" and "Shafer", and the user types in an "r", both items are returned in the filter. I would like it to only find results beginning with the input value, so that a user input "r" would only return schools beginning with the letter "r", and so on with any user input letter. I have found regexp expressions to search for first letter in a string, but I haven't been able to execute anything successfully in this scenario. Is it possible, and if so, any suggestions would be greatly appreciated.
... View more
05-09-2016
09:12 AM
|
0
|
2
|
1582
|
POST
|
Robert, Wow, I sure missed that. Amazing stuff, as usual. Thanks! Jim Faron
... View more
05-19-2014
05:40 PM
|
0
|
0
|
382
|
POST
|
Robert, I am upgrading from an earlier version of your widget, and I am encountering a problem with the graphic not showing at all zoom levels. The reason is that the layer in question is part of a tiled basemap that has several group layers that have min and max scales in the parent layers. For example, the layer that I am using in the xml is https://myserver/arcgis/rest/services/Maps/BaseMap/MapServer/110. That layer has a parent layer with a min and max scale (the layer itself does not have a min or max scale, i.e. it is type Feature Layer). In the older versions of the eSearch Widget, the search result graphic was I believe added to a graphics layer, which was added to the map, thus it appeared at all scales. Could you give me a pointer as to what I may be able to do to get the graphic to not be bound by the min and max scale of its parent layer? The rest service is behind a firewall. I attached a screen shot of the service, where layer 110 is the Feature Layer that is being queried in the widget, and layer 107 is the group layer that has the min and max scale that is limiting the graphic's visibility. Thanks, Jim Faron Katy Independent School District
... View more
05-19-2014
01:32 PM
|
0
|
0
|
382
|
POST
|
Yes, that worked! Thanks so much for the reference. OpenScales is a great resource. Jim Faron Austin Independent School District
... View more
09-03-2013
06:42 AM
|
0
|
0
|
224
|
POST
|
This may not be possible, but I thought I would ask: Can a geometry service be made to work synchronously within a function that returns a value? In other words, in a similar manner that WebMercatorUtil can work? Or can the code in the function be somehow adjusted so as to delay the return of the point until the geometry service has completed and returned the new value? For example, in the following function, 'return newPoint' will complete before the geometry service will fire, because the geometry service call and response is asynchronous (no matter how I do it), whereas one can use WebMercatorUtil synchronously. public function convertToPoint(x:Number, y:Number, bool:Boolean):Point { var _pointObject:MapPoint = new MapPoint(); _pointObject.spatialReference = new SpatialReference(4326); _pointObject.x = x; _pointObject.y = y; if(bool) { _pointObject = WebMercatorUtil.geographicToWebMercator(_pointObject) as MapPoint; } if((bool) && (!isNaN(x)) && (!isNaN(y))) { const projParams:ProjectParameters = new ProjectParameters(); projParams.geometries = [_pointObject ]; var outSR:SpatialReference = new SpatialReference(2277); projParams.outSpatialReference = outSR; this.geomServ.project(projParams, new AsyncResponder( function pResult(item:Object, token:Object = null):void{ var pt:MapPoint = (item as Array)[0] as MapPoint; _pointObject.x = pt.x; _pointObject.y = pt.y; }, function pFault(fault:Fault, token:Object = null):void{ Alert.show("Error: " + fault.faultString, "Error code: " + fault.faultCode); } ) ); } else { _pointObject = WebMercatorUtil.webMercatorToGeographic(_pointObject) as MapPoint; } return new Point(_pointObject.x, _pointObject.y); } Thanks, Jim Faron Austin Independent School District
... View more
09-02-2013
09:45 AM
|
0
|
2
|
599
|
Title | Kudos | Posted |
---|---|---|
1 | 03-09-2023 07:05 AM | |
1 | 06-25-2021 08:54 AM | |
1 | 06-25-2021 08:35 AM | |
1 | 06-27-2022 02:18 PM | |
7 | 06-24-2021 03:26 PM |
Online Status |
Offline
|
Date Last Visited |
04-13-2023
10:27 AM
|