|
POST
|
Hi, I have a WAB app with some modified code. I've been running this code in WAB V2.8 for awhile without issue and need to upgrade to V2.13. This code has failed in V2.13 This code allows the user to click on the map, coordinates are collected, popup is shown with URL link to Survey123. Right now it does everything but show the popup. I will include the code below which sits in server->apps->2->jimu.js->MapManager.js-> in the publish map event function: _publishMapEvent: function(map) {
topic.subscribe('toggleChanged', lang.hitch(this, function(visible, layer){
if(visible && layer.title=='t_Main_Floor'||layer.title=='t_Mezz_Floor'){
this.SERVICE_ID = layer.title;
}
}));
// create node for the tooltip
var tip = "Click on problem location";
var tooltip = dojo.create("div", { "class": "tooltip", "innerHTML": tip }, map.container);
dojo.style(tooltip, "position", "fixed");
// update the tooltip as the mouse moves over the map
dojo.connect(map, "onMouseMove", function(evt) {
var px, py;
if (evt.clientX || evt.pageY) {
px = evt.clientX;
py = evt.clientY;
} else {
px = evt.clientX + dojo.body().scrollLeft - dojo.body().clientLeft;
py = evt.clientY + dojo.body().scrollTop - dojo.body().clientTop;
}
// dojo.style(tooltip, "display", "none");
tooltip.style.display = "none";
dojo.style(tooltip, { left: (px + 15) + "px", top: (py) + "px" });
// dojo.style(tooltip, "display", "");
tooltip.style.display = "";
// console.log("updated tooltip pos.");
});
// hide the tooltip the cursor isn't over the map
dojo.connect(map, "onMouseOut", function(evt){
tooltip.style.display = "none";
});
//add this property for debug purpose
window._viewerMap = map;
MapUrlParamsHandler.postProcessUrlParams(this.urlParams, map);
console.timeEnd('Load Map');
if (this.map) {
this.map = map;
this.resetInfoWindow(true);
console.log('map changed.');
topic.publish('mapChanged', this.map, this.layerInfosObj);
} else {
this.map = map;
this.resetInfoWindow(true);
topic.publish('mapLoaded', this.map, this.layerInfosObj);
}
require([
'esri/graphic',
'esri/symbols/SimpleMarkerSymbol',
'esri/symbols/SimpleLineSymbol',
'esri/Color'
],
lang.hitch(this, function(Graphic, SimpleMarkerSymbol, SimpleLineSymbol, Color){
var symbol = new SimpleMarkerSymbol(
SimpleMarkerSymbol.STYLE_CIRCLE, 0.01,
new SimpleLineSymbol(
SimpleLineSymbol.STYLE_CIRCLE,
new Color([207, 16, 45, 0.9]),
1
),
new Color([207, 16, 45, 0.9])
);
map.on("click", lang.hitch(this, function(evt){
var gra = new Graphic(evt.mapPoint, symbol);
setTimeout(lang.hitch(this, function(){
var selFeats = map.infoWindow.features;
if(!selFeats){
map.graphics.clear();
map.graphics.add(gra);
//PopupCenter('http://www.xtf.dk','xtf','900','500');
map.infoWindow.setContent('<a href="https://survey123.arcgis.com/share/surveyID?center='+ evt.mapPoint.getLatitude().toString() + ','+ evt.mapPoint.getLongitude().toString() + '&field:Floor_Selection=' + this.SERVICE_ID.split('_')[1]+"_Floor " + '" target="_"><font size="4">Click here to submit </font></a>');
SERVICE_ID: null;
map.infoWindow.show(evt.mapPoint);
}
}), 1000);
}));
}));
},
... View more
09-20-2019
02:08 PM
|
0
|
18
|
4564
|
|
BLOG
|
My pictures wont show. How can I show the pictures this way if I don't wan to make the data public? The ops dashboard can do it without making data public so this should operate the same way shouldn't it?
... View more
09-20-2019
01:23 PM
|
0
|
0
|
63897
|
|
POST
|
Hi Philip Wilson My data wont be deleted following these steps? Thanks
... View more
09-17-2019
07:37 AM
|
0
|
3
|
3879
|
|
POST
|
I built an app in dev edition of web app builder and included Arcade expressions in my web map popups. When I explore the same popup in WAB app the values are not calculating. Any ideas why? Thanks
... View more
09-16-2019
06:59 AM
|
1
|
2
|
1803
|
|
POST
|
Hi Ismael Chivite The use case is that I have 2 separate surveys that I send data from one to another. The 2nd survey acts as my "edit" function which captures data from the user and sends it back to the main survey using REST. As I want to allow the user to add a picture in this 2nd survey, I need a way to send the picture via REST to the 1st survey but for it to not show (the image type) in the 1st survey as I would only show the image in the popup on my web map. Thanks
... View more
09-09-2019
06:47 AM
|
0
|
0
|
889
|
|
POST
|
I need to make a hidden field only accept images. Is there a way to set the type to image even though its set to hidden?
... View more
09-06-2019
02:07 PM
|
0
|
2
|
947
|
|
POST
|
Jake Skinner did you find a way to upload larger than 10MB?
... View more
09-06-2019
01:47 PM
|
0
|
1
|
2646
|
|
POST
|
Update: Had to turn off the problem field in editor tool in WAB and then turn it back on and it seemed to work
... View more
09-05-2019
10:45 AM
|
0
|
0
|
773
|
|
POST
|
I have an app that I built in web app builder (dev edition) and it consumes a feature service which has a related table. Now when I go to edit the related table of a point in the feature service, I can see the fields and they honor the field alias I have set...except for one which shows the field name. Is this a bug or am is there something else wrong?
... View more
09-05-2019
09:37 AM
|
0
|
1
|
870
|
|
POST
|
Hi James, A sample of the URL: https://survey123.arcgis.com/share/xyz123?field:ID=682&field:Floor=Main_Floor&field:Name=Joe&field:Request=Light&field:Worker=Bob For example the name isn't being passed into the field Worker even when I break it down and only pass in that field. I've used this format the whole way through with tons of other fields I have but this is the first time such a problem has occurred. This Worker field has a condition based on a select one question.
... View more
09-04-2019
02:06 PM
|
0
|
0
|
1055
|
|
POST
|
Any help with this James Tedrick Ismael Chivite Philip Wilson Johnathan Hasthorpe Thanks
... View more
09-04-2019
12:42 PM
|
0
|
0
|
1055
|
|
POST
|
Hi Mark, I ended up creating my report in Survey123 using the custom report function, webhooks, and Integromat. The route shown here would be nice but it doesn't work as nicely as expected without tons of new development. For my purposes the Survey123 report actually works better because I can send it in an email to the user very easily. The report also handles the complexities like related tables and pictures. Let me know if you need any specifics and I would be more than happy to provide you more info.
... View more
09-04-2019
07:45 AM
|
0
|
0
|
2293
|
|
BLOG
|
I've ran through the steps but I get the cannot load error in my popup. Any ideas why?
... View more
09-03-2019
01:49 PM
|
0
|
0
|
63897
|
|
POST
|
In web app builder I'm building an app that allows for clicks on a map and custom popup to show. I'm trying to add a second link to my popup but it appears like its adding as one long line. How can I split the one line into 2 separate lines in the one popup. Below I've included what I have so far in my MapManager.js within publishMapEvent Thanks map.infoWindow.setContent('<a href="https://survey123.arcgis.com/share/ID?center='+ evt.mapPoint.getLatitude().toString() + ','+ evt.mapPoint.getLongitude().toString() + '&field:Floor_Selection=' + this.SERVICE_ID.split('_')[1]+"_Floor " + '" target="_"><font size="4">Click here to submit 1</font></a>' + '<a href="https://survey123.arcgis.com/share/ID?center='+ evt.mapPoint.getLatitude().toString() + ','+ evt.mapPoint.getLongitude().toString() + '" target="_"><font size="4"> Click here to submit 2 </font></a>');
... View more
08-30-2019
12:46 PM
|
1
|
2
|
914
|
| Title | Kudos | Posted |
|---|---|---|
| 1 | 10-31-2018 08:24 AM | |
| 3 | 12-18-2018 09:23 AM | |
| 1 | 12-02-2019 07:53 AM | |
| 1 | 04-24-2020 11:11 AM | |
| 1 | 08-14-2019 02:25 PM |
| Online Status |
Offline
|
| Date Last Visited |
11-11-2020
02:25 AM
|