|
POST
|
Hi all, I would like to trigger a Survey123 survey from a popup window in a web map. For this I would like to offer the end user a clickable button in the popup (see figure 1). I created the button using the code below. But when I save the web map and reopen it, all that is left is a simple hyperlink (see figure 2). What do I do wrong? Why is the configuration of my button not properly saved in the web map? Any advice would be appreciated. TIA, Egge-Jan <a href="arcgis-survey123://?itemID={itemID_of_my_survey}&field:EQUIPMENTNR={EQUIPMENTNR}"><button style="background-color:#4CAF50;border:none;color:white;padding:32px;text-align:center;text-decoration:bold;display:inline-block;font-size:24px;border-width:2px;border-style:solid;border-color:#006400;border-radius:50px;">Notification</button></a>
... View more
08-23-2019
01:53 AM
|
1
|
2
|
1262
|
|
POST
|
I guess 'coming soon' means that it will come whenever Esri thinks it is time to add this functionality... 🙂
... View more
08-22-2019
06:59 AM
|
1
|
0
|
4810
|
|
POST
|
Hi z xz, Pass in empty source array to clear the default ArcGIS Online World Geocoding service: sources: [] See this example, showing the defaults ArcGIS Online World Geocoding service:Search multiple sources | ArcGIS API for JavaScript 3.29 No you can modify the code (e.g. in CodePen) to modify the search to remove this default service: var search = new Search({
enableButtonMode: true, //this enables the search widget to display as a single button
enableLabel: false,
enableInfoWindow: true,
showInfoWindowOnSelect: false,
map: map,
//passing in empty source array to clear the default ArcGIS Online World Geocoding service
sources: []
}, "search");
Does this work for you? Cheers, Egge-Jan
... View more
08-22-2019
02:19 AM
|
2
|
2
|
2388
|
|
POST
|
Hi forest knutsen, You might have a look at What's new for developers at 10.7 (ArcObjects .NET 10.7 SDK) to see what you are missing. HTH, Egge-Jan
... View more
08-22-2019
12:42 AM
|
0
|
0
|
2436
|
|
POST
|
Hi kawish abbas, Yeah, I suppose you can apply the renderer to any kind of point layer. Cheers, Egge-Jan
... View more
08-21-2019
05:13 AM
|
0
|
1
|
4185
|
|
POST
|
Hi Ritika Manderwal, Can you please show us the code of your application? In that way we might be able to test and find out what is going wrong. Cheers, Egge-Jan
... View more
08-21-2019
01:05 AM
|
0
|
1
|
4207
|
|
POST
|
Hi Marije ten Napel, Did you have a look at this sample: Directions widget | ArcGIS API for JavaScript 4.12 This sample requires a proxy to handle communications with the routing service. This example uses an ArcGIS Online hosted proxy. You can either remove it and log in once prompted, or you can set up your own service proxy. HTH, Egge-Jan
... View more
08-21-2019
12:43 AM
|
0
|
2
|
1093
|
|
POST
|
Hi David Tshamussa, If you have a look in the Release notes for 4.12 | ArcGIS API for JavaScript 4.12, you will see that a new property availableCreateTools has been added to esri/widgets/Sketch. So, maybe you have to update your code when upgrading to 4.12? For a working example, see: Sketch widget | ArcGIS API for JavaScript 4.12. HTH, Egge-Jan
... View more
08-12-2019
05:32 AM
|
1
|
0
|
1057
|
|
POST
|
Hi Laurent Dedry, Did you see this thread: Layerlist with a Legend sample ? The solution there was to suppress the message using CSS: div.esri-legend__message {
display: none;
} HTH, Egge-Jan
... View more
08-12-2019
04:41 AM
|
0
|
1
|
1448
|
|
POST
|
Hi Nicholas, Sounds reasonable doesn't it? The modulo operator (MOD) can only be applied to integer values. MOD returns the remainder of integer_exp1 divided by integer_exp2. Maybe you should use the CAST function to converts your input values to integers first. The syntax is as follows: CAST(exp AS data_type) See: SQL reference for query expressions used in ArcGIS—ArcGIS Pro | ArcGIS Desktop HTH, Egge-Jan
... View more
08-01-2019
08:27 AM
|
0
|
0
|
1079
|
|
POST
|
Maybe you should have a look here: OAuth Basic | ArcGIS API for JavaScript 3.29
... View more
08-01-2019
02:23 AM
|
0
|
0
|
1363
|
|
POST
|
Hi Nadir Hussain, You will have to get access to your feature layer using OAuthentication first: Access ArcGIS Online items using OAuthentication | ArcGIS API for JavaScript 4.12 HTH, Egge-Jan
... View more
08-01-2019
01:35 AM
|
0
|
3
|
1363
|
|
POST
|
Hi Minhazul Islam, Did you already have a look at this resource: ArcGIS for Developers ? Depending on your API of choice, you may have a look at - for example - the ArcGIS API for JavaScript and Create a starter app within minutes. If you want to stick with Python, you might have a look here: ArcGIS API for Python HTH, Egge-Jan
... View more
07-31-2019
10:13 AM
|
2
|
1
|
1075
|
|
POST
|
Hi Roman Chueh, Hmmm, you are right. In this case a simple JavaScript solution won't work. You will have to use Avenue or Arcade or something to accomplish what you want... In the sample below I have added three lines with date information to the label: var Today = Day(Now()) + '/' + (Month(Now()) + 1) + '/' + YEAR(Now());
var OBS_DT = $feature.OBS_DATETIME;
var OBS_DT2 = Day($feature.OBS_DATETIME) + '/' + (Month($feature.OBS_DATETIME) + 1) + '/' + YEAR($feature.OBS_DATETIME);
Please note: you have to add 1 to the month because the Arcade Month() function Returns the month of the given date. Values range from 0-11 where January is 0 and December is 11 . See ArcGIS Arcade Date Functions | ArcGIS for Developers I have attached the full code of my test case (based on this sample Multi-line labels | ArcGIS API for JavaScript 4.12) below. Does this solve your issue? Egge-Jan <!DOCTYPE html>
<html>
<head>
<meta charset="utf-8" />
<meta name="viewport" content="initial-scale=1,maximum-scale=1,user-scalable=no"/>
<title>Multi-line labels with date information - 4.12</title>
<link rel="stylesheet" href="https://js.arcgis.com/4.12/esri/themes/light/main.css"/>
<script src="https://js.arcgis.com/4.12/"></script>
<style>
html, body, #viewDiv {
padding: 0;
margin: 0;
height: 100%;
width: 100%;
}
</style>
<script type="text/plain" id="label-expression">
var Today = Day(Now()) + '/' + (Month(Now()) + 1) + '/' + YEAR(Now());
var OBS_DT = $feature.OBS_DATETIME;
var OBS_DT2 = Day($feature.OBS_DATETIME) + '/' + (Month($feature.OBS_DATETIME) + 1) + '/' + YEAR($feature.OBS_DATETIME);
var DEG = $feature.WIND_DIRECT;
var SPEED = $feature.WIND_SPEED;
var DIR = When( SPEED == 0, null,
(DEG < 22.5 && DEG >= 0) || DEG > 337.5, 'N',
DEG >= 22.5 && DEG < 67.5, 'NE',
DEG >= 67.5 && DEG < 112.5, 'E',
DEG >= 112.5 && DEG < 157.5, 'SE',
DEG >= 157.5 && DEG < 202.5, 'S',
DEG >= 202.5 && DEG < 247.5, 'SW',
DEG >= 247.5 && DEG < 292.5, 'W',
DEG >= 292.5 && DEG < 337.5, 'NW', null );
var WIND = SPEED + ' mph ' + DIR;
var TEMP = Round($feature.TEMP) + '° F';
var RH = $feature.R_HUMIDITY + '% RH';
var NAME = $feature.STATION_NAME;
var labels = [Today, OBS_DT, OBS_DT2, NAME, TEMP, WIND, RH ];
return Concatenate(labels, TextFormatting.NewLine);
</script>
<script>
require([
"esri/WebMap",
"esri/views/MapView",
"esri/layers/FeatureLayer"
], function(WebMap, MapView, FeatureLayer) {
const minScale = 250000000;
const serviceUrl = "https://services.arcgis.com/V6ZHFr6zdgNZuVG0/arcgis/rest/services/weather_stations_010417/FeatureServer/0";
const view = new MapView({
container: "viewDiv",
map: new WebMap({
portalItem: {
id: "372b7caa8fe340b0a6300df93ef18a7e"
},
layers: [
new FeatureLayer({
url: serviceUrl,
renderer: {
type: "simple",
symbol: {
type: "simple-marker",
color: [75, 75, 75, 0.7],
size: 4,
outline: null
}
},
labelingInfo: [
{
labelExpressionInfo: {
expression: document.getElementById("label-expression")
.text
},
labelPlacement: "center-right",
minScale: minScale,
symbol: {
type: "text", // autocasts as new TextSymbol()
font: {
size: 9,
family: "Noto Sans"
},
horizontalAlignment: "left",
color: "#2b2b2b"
}
}
]
})
]
}),
center: [-117.842, 33.799],
zoom: 10
});
});
</script>
</head>
<body>
<div id="viewDiv"></div>
</body>
</html>
... View more
07-29-2019
01:05 PM
|
2
|
1
|
2893
|
| Title | Kudos | Posted |
|---|---|---|
| 1 | 03-11-2019 08:58 AM | |
| 1 | 03-30-2020 09:03 AM | |
| 2 | 12-12-2024 03:56 AM | |
| 2 | 04-15-2024 03:25 AM | |
| 2 | 03-25-2024 02:06 PM |
| Online Status |
Offline
|
| Date Last Visited |
11-19-2025
02:25 AM
|