POST
|
Hi Sumilan Govinden, Esri offers global coverage with Routing and Directions with ArcGIS and I would be very surprised if South Africa would not be covered. So, the other scenario is: your input is incorrect. Let's try to fix the input for your route stops to get your request running. Following the steps on this page with the Los Angeles example (Get a route and directions | ArcGIS for Developers), can you please make sure the "geometry" of your route stops is correct? Please note: you first have to provide x (longitude) and then y (latitude), so maybe just switching your input coordinates might already do the trick. And make sure to set the correct "spatialReference". (If you are providing your coordinates in WGS84, then 4326 will do.) Please let us, the GeoNet community, know whether you managed to solve your issue or not. BR, Egge-Jan
... View more
07-26-2020
05:05 AM
|
0
|
0
|
686
|
POST
|
Hi Bruce Williams, Yeah, these Coded Value Domains are a source of confusion... Very often you get the code when you need the description. Or the other way round, you get the description where you really need the code... There is an easy trick however to avoid all this mess. I did learn this trick from an experienced Esri user who knows his ways around the flaws in the system. And this trick is? Just make sure the code and the description are equal to each other, in all circumstances! So in your case you should not use: H = Healthy / S = Stressed / D = Dead Instead you should just use: Healthy = Healthy / Stressed = Stressed / Dead = Dead With this solution your Collector will still show the domain code instead of the description, but you won't notice this and you won't care anymore 🙂 HTH, Egge-Jan
... View more
07-25-2020
02:05 AM
|
1
|
1
|
1796
|
POST
|
Hi @Khairul, To create a TIN surface with ArcGIS Pro you will need an additional license. See: Create a TIN surface—ArcGIS Pro | Documentation Available with 3D Analyst license. BR, Egge-Jan
... View more
07-25-2020
01:35 AM
|
0
|
1
|
837
|
POST
|
Hi Paul McCord, Yes, I do see what you mean. I replicated your case - see full code below. Using your basemap (having LODs 0-22) I manage to get it working with ArcGIS API for JS v4.16. With that version it is perfectly possible to limit zooming between levels 13 an 19 -> try the example below. But as soon as I downgrade to 4.11 I encounter the same issue: no zooming beyond level 16. Weird... So, the question is: do you really have to stuck with version 4.11? HTH, Egge-Jan <html>
<head>
<meta charset="utf-8">
<meta name="viewport" content="initial-scale=1, maximum-scale=1, user-scalable=no">
<title>ArcGIS JavaScript Tutorials: zoom constraints</title>
<link rel="stylesheet" href="https://js.arcgis.com/4.16/esri/css/main.css">
<script src="https://js.arcgis.com/4.16/"></script>
<style>
html, body, #viewDiv {
padding: 0;
margin: 0;
height: 100%;
width: 100%;
}
#location {
padding: 15px;
background: white;
color: black;
border: 5px solid gold;
font-family: sans-serif;
font-size: 1.2em;
}
</style>
<script>
require([
"esri/Map",
"esri/Basemap",
"esri/views/MapView",
"esri/layers/VectorTileLayer",
"esri/core/watchUtils"
], function(Map, Basemap, MapView, VectorTileLayer, watchUtils) {
var map = new Map({
basemap: new Basemap({
baseLayers: [
new VectorTileLayer({
portalItem: {
id: "ddef64bb74174dd6adf7cff46dd24da7"
}
})
],
title: "customBM",
id: "customBM"
})
});
var view = new MapView({
container: "viewDiv",
map: map,
center: [-73.966667, 40.783333], // longitude, latitude
zoom: 15
});
//Constrain the max and min zoom levels
view.constraints = {
minZoom: 13,
maxZoom: 19
};
view.ui.add("location", "bottom-left");
watchUtils.whenTrue(view, "stationary", function() {
lon = parseInt(view.center.x); // with parseInt values are rounded to the full meter (coordinates in Web Mercator - EPSG:3857)
lat = parseInt(view.center.y);
zoomLevel = view.zoom;
document.getElementById("location").innerHTML = "Map Center - Longitude: " + lon + " / Latitude: " + lat + " / Zoom level: " + zoomLevel;
});
});
</script>
</head>
<body>
<div id="viewDiv"></div>
<div id="location"></div>
</body>
</html>
... View more
07-24-2020
02:31 PM
|
1
|
1
|
2580
|
POST
|
Hi Gemeente Roosendaal, The goal is to show the municipality of Roosendaal on the map. As an alternative to the WFS Service from PDOK/Nationaal Georegister you might also consider to use Open Data provided by Esri Nederland. Esri Nederland offers more and more Open Data for the Netherlands as web services, which is very convenient for the Dutch ArcGIS community. In this case we need the Feature Layer Gemeenten (Bestuurlijke Grenzen 2019) which can be added via ArcGIS Online. After adding this layer you van apply a filter and modify the style. Would this be a nice workaround to solve your issue? BR, Egge-Jan
... View more
07-24-2020
06:58 AM
|
0
|
1
|
2177
|
POST
|
Hi Sushant Sardeshpande, Via rest/admin/services you will have access to UpdateDefinition, like for example: https://services6.arcgis.com/xxxxxxxxxxxxxArcGIS/rest/admin/services/My_Observations/FeatureServer/0/updateDefinition You will find a step-by-step instruction on how to increase this value on this page: How To: Update the maximum record count for feature services in ArcGIS Online HTH, Egge-Jan
... View more
07-24-2020
12:31 AM
|
0
|
3
|
7201
|
POST
|
Hi Andrew Murdoch, I am triggered by the last part of your question: ideally we want a small button on the map that looks like the other widget buttons. Yes, you can add your own custom button, with a look and feel similar to the other widget buttons if you choose one from Esri Icon Font (Calcite theme) | ArcGIS API for JavaScript 4.16 Below you will find a little sample app showing how this should work: Create a <div> with your button - I have chosen the printer icon: <div id="myOwnPrinterButton" class="esri-component esri-widget--button esri-widget" role="button"><span title="This looks like a printer button" id="custom-printer" class="esri-icon esri-icon-printer"></span></div> Add this to the view.ui like this: view.ui.add(["myOwnPrinterButton"], "top-right"); Add an event listener: printerButton.addEventListener("click", printerAction); Call a function In my case the function is just a simple alert. It is up to you to implement the full printing functionality that you are describing in your question. Here you can see it working in CodePen: ArcGIS JavaScript Tutorial - Add your own custom button HTH, Egge-Jan <html>
<head>
<meta charset="utf-8">
<meta name="viewport" content="initial-scale=1, maximum-scale=1, user-scalable=no">
<title>ArcGIS JavaScript Tutorials: Add your own custom button</title>
<style>
html, body, #viewDiv {
padding: 0;
margin: 0;
height: 100%;
width: 100%;
}
</style>
<link rel="stylesheet" href="https://js.arcgis.com/4.16/esri/themes/light/main.css">
<script src="https://js.arcgis.com/4.16/"></script>
<script>
require([
"esri/Map",
"esri/views/MapView",
], function(Map, MapView) {
var map = new Map({
basemap: "topo-vector"
});
var view = new MapView({
container: "viewDiv",
map: map,
center: [-118.80500, 34.02700],
zoom: 13
});
view.ui.add(["myOwnPrinterButton"], "top-right");
var printerButton = document.getElementById("myOwnPrinterButton");
printerButton.addEventListener("click", printerAction);
function printerAction(evt) {
window.alert("Functionality to be implemented")
}
});
</script>
</head>
<body>
<div id="viewDiv"></div>
<div id="myOwnPrinterButton" class="esri-component esri-widget--button esri-widget" role="button"><span title="This looks like a printer button" id="custom-printer" class="esri-icon esri-icon-printer"></span></div>
</body>
</html>
... View more
07-23-2020
10:30 AM
|
1
|
1
|
4815
|
POST
|
Hi young chun, Please refer to this page: Getting a WebGL Implementation Here they say: WebGL 1.0 is supported in the stable releases of most major browsers on both desktop and mobile platforms. Chrome, Firefox, Internet Explorer, Opera, and Safari are all known to have good WebGL support on both desktop and mobile browsers. But: Technical issues such as known hardware problems or lack of required GPU features may prevent WebGL from running in some cases. HTH, Egge-Jan
... View more
07-23-2020
06:21 AM
|
2
|
1
|
1416
|
POST
|
Hi Jethro Leevers, Did you see this thread? [arcgis js api 4.*] remove blue frame/outline around MapView There Robert Scheitlin, GISP suggests the following solution, using CSS: .esri-view .esri-view-surface--inset-outline:focus::after {
outline: none !important;
} HTH, Egge-Jan
... View more
07-23-2020
02:35 AM
|
6
|
2
|
2122
|
POST
|
Hi Siyabonga Kubeka, You may use watchUtils to capture the zoom level when the view becomes stationary, and then add this value to your map. Like this: watchUtils.whenTrue(view, "stationary", function() {
lon = parseInt(view.center.x); // with parseInt values are rounded to the full meter (coordinates in Web Mercator - EPSG:3857)
lat = parseInt(view.center.y);
zoomLevel = view.zoom;
document.getElementById("location").innerHTML = "Map Center - Longitude: " + lon + " / Latitude: " + lat + " / Zoom level: " + zoomLevel;
});
HTH, Egge-Jan Here is the full solution: <html>
<head>
<meta charset="utf-8">
<meta name="viewport" content="initial-scale=1, maximum-scale=1, user-scalable=no">
<title>ArcGIS JavaScript Tutorials: show zoom level</title>
<style>
html, body, #viewDiv {
padding: 0;
margin: 0;
height: 100%;
width: 100%;
}
#location {
padding: 15px;
background: white;
color: black;
border: 5px solid gold;
font-family: sans-serif;
font-size: 1.2em;
}
</style>
<link rel="stylesheet" href="https://js.arcgis.com/4.16/esri/css/main.css">
<script src="https://js.arcgis.com/4.16/"></script>
<script>
require([
"esri/Map",
"esri/views/MapView",
"esri/core/watchUtils"
], function(Map, MapView, watchUtils) {
var map = new Map({
basemap: "streets"
});
var view = new MapView({
container: "viewDiv",
map: map,
center: [90, 45], // longitude, latitude
zoom: 5
});
view.ui.add("location", "bottom-left");
watchUtils.whenTrue(view, "stationary", function() {
lon = parseInt(view.center.x); // with parseInt values are rounded to the full meter (coordinates in Web Mercator - EPSG:3857)
lat = parseInt(view.center.y);
zoomLevel = view.zoom;
document.getElementById("location").innerHTML = "Map Center - Longitude: " + lon + " / Latitude: " + lat + " / Zoom level: " + zoomLevel;
});
});
</script>
</head>
<body>
<div id="viewDiv"></div>
<div id="location"></div>
</body>
</html>
... View more
07-22-2020
06:56 AM
|
1
|
1
|
1846
|
POST
|
Hi Ben -, To access your content you should go and Get an access token | ArcGIS for Developers HTH, Egge-Jan
... View more
07-21-2020
12:00 PM
|
0
|
0
|
608
|
POST
|
Hi Victor Tey, Why do you put a forward slash between the path and the file? What happens if you replace this "/" with "\\" ? Does this solve your issue? BR, Egge-Jan
... View more
07-21-2020
02:30 AM
|
1
|
1
|
4339
|
POST
|
Hi Marco Amaya, If you think your issue is solved you may mark the answer as correct. In that way other GeoNet members can see that the call is closed. TIA, Egge-Jan
... View more
07-20-2020
07:51 AM
|
3
|
0
|
1814
|
POST
|
Hi Marco Amaya, Did you discover your mistake already? Your code is fine, including the use of the spatialreference parameter, except for the fact that you are using comma's (",") instead of dots (".") as decimal separators in your X and Y values. As soon as you have replaced the decimal separators you are good to go! With the coordinates you have given I end up on the southwestern outskirts of Tegucigalpa, Honduras, right? HTH, Egge-Jan [
{
"geometry": {
"x": -87.2618664,
"y": 14.045737,
"spatialReference": {
"wkid": 4326
}
},
"attributes" : {
"field1" : "test",
"field2" : "SI",
"field3" : "EC",
"field4" : "test",
"field5" : "test"
}
}
]
... View more
07-20-2020
06:01 AM
|
3
|
0
|
1814
|
POST
|
Hi rajni sharma, Please have a look at this page Configure Map Viewer—AppStudio for ArcGIS | Documentation for information about accessing secured web maps: To access a secured web map in your organization or ArcGIS Enterprise portal using OAuth2, register your app and provide a client ID. For more information, see Sign your app. By default, only public web maps will appear in the Map Viewer gallery; to access secured maps, enable the support secured maps property in the app's settings. HTH, Egge-Jan
... View more
07-20-2020
01:54 AM
|
0
|
0
|
288
|
Title | Kudos | Posted |
---|---|---|
2 | 04-15-2024 03:25 AM | |
2 | 03-25-2024 02:06 PM | |
1 | 01-17-2024 10:19 AM | |
1 | 03-30-2023 05:57 AM | |
2 | 02-02-2023 02:47 PM |
Online Status |
Offline
|
Date Last Visited |
07-26-2024
02:35 PM
|