|
POST
|
There's this, but they don't tell you where it goes: Splash—Web AppBuilder for ArcGIS (Developer Edition) | ArcGIS for Developers And there's nothing on ArcGIS API for JavaScript 4.8 sample code page: Samples Overview | ArcGIS API for JavaScript 4.8
... View more
08-24-2018
11:18 AM
|
0
|
6
|
3843
|
|
POST
|
Robert, You're able to see the entire popup? Maybe it's a phone version issue then? On my Android 3G smart phone I'm only getting the upper left corner of the popup. It's on the bottom right side, but most of it is off the screen. This is the problem I'm having. And so, I was asking if there were other ways to dock it? EDIT: I just did a Google Chrome (browser I use on my phone) update and now the popup seems to dock pretty decently on the bottom, as you said yours did. I also changed the breakpoint to true. However, it didn't actually do what it was supposed to on the phone, which to my understanding is to undock it. popup: {
dockEnabled: true,
dockOptions: {
// Disables the dock button from the popup
buttonEnabled: false,
// Ignore the default sizes that trigger responsive docking
breakpoint: true,
}}
... View more
08-21-2018
09:18 AM
|
0
|
1
|
2029
|
|
POST
|
Hello, I'm building my first app using snippets. I need help adjusting a popup so that it appears correctly on a mobile device. As of now the app looks good on a PC, but on my smart phone the popup is almost completely off the screen. EDIT: My intention is to have a docked popup in the top right corner. When viewing the app on a PC that's where it is, so that's good. So far, I had a look at this sample code. But, I didn't get anything out of it. Popup dock positions | ArcGIS API for JavaScript 4.8 Here's my code: <!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<meta name="viewport" content="initial-scale=1, maximum-scale=1, user-scalable=no">
<title>Intro to Popups</title>
<style>
html,
body,
#viewDiv {
padding: 0;
margin: 0;
height: 100%;
width: 100%;
}
</style>
<link rel="stylesheet" href="http://js.arcgis.com/4.8/esri/css/main.css">
<script src="http://js.arcgis.com/4.8/"></script>
<script>
require([
"esri/Map",
"esri/views/MapView",
"esri/layers/FeatureLayer", //Require the FeatureLayer module
"esri/Graphic",
"dojo/dom",
"dojo/on",
"dojo/domReady!"
],
function(
Map, MapView, FeatureLayer, Graphic, dom, on
) {
var warming = new FeatureLayer({
url: "https://services.arcgis.com/fGsbyIOAuxHnF97m/arcgis/rest/services/Warming_Centers_in_and_around_Will_County_IL/FeatureServer/0?token=D_nuNBIqs-eSw-9SGAdtGHxOVGD9pC8U4gGOmwpkyvPxwvwCO3eiuSxaK4gbuO6x5aDZil_xW_iObpWePfHpIO_Vf-Rj2J7B_XnG95zynEqa0iuT0KE_OwujjdUMszM3raRq0zW9WskdokSXWHn8tJGb55fPni3coDnntG0lTOi9u5mfWf4mLRIfLBshuC2vXCiNLVzicWbH39jCFokDiqDjt8YfOdfyasL4ljvNftkl9Jpkr-7OJNElSp2yY9SG",
id: "warming",
minScale: 5000000
});
var boundary = new FeatureLayer({
url: "http://services.arcgis.com/fGsbyIOAuxHnF97m/arcgis/rest/services/Will_County_Boundary/FeatureServer/0?token=6vBDftNXDqbaZH6fbfhuDCeGkJFaWMSEPaeYDt6PbDBfVacnSMMD7PZS3QeCW6mDqgSFMK0tRjMyJyrxDPQ3rcjTNUCFpi0pfpU_mFLoKXGlT5FTGTPH3GjMqL9iQCqh9_ihX8D1-DQ5N_ptC-ic9bKeDLjqU2xQOv8wIRPjX5VwrtsQz_ltdanO49SVPaJ8F7EN6qWZMgvFw9V0iBbV4Iu0khjfjhuswBNzhjJa3I6q0epaze9AsPRVvVXJ5wik",
id: "boundary",
zoom: 1,
});
var map = new Map({
basemap: "streets-night-vector",
layers: [warming, boundary]
});
var view = new MapView({
container: "viewDiv",
map: map,
scale: 1000000,
center: [-88, 41.5],
popup: {
dockEnabled: true,
dockOptions: {
// Disables the dock button from the popup
buttonEnabled: false,
// Ignore the default sizes that trigger responsive docking
breakpoint: false,
}}
});
var template = { // autocasts as new PopupTemplate()
title: "{FACILITY_NAME}",
content: [{
type: "fields",
fieldInfos: [{
fieldName: "FACILITY_TYPE",
label: "Facility Type",
visible: true,
}, {
fieldName: "ADDRESS",
label: "Address",
visible: true,
}, {
fieldName: "WEBSITE",
label: "Website",
visible: true,
}, {
fieldName: "PHONE_NUMBER",
label: "Phone",
visible: true,
}, {
fieldName: "HOURS",
label: "Hours",
visible: true,
}]
}]
};
var featureLayer = new FeatureLayer({
url: "https://services.arcgis.com/fGsbyIOAuxHnF97m/arcgis/rest/services/Warming_Centers_in_and_around_Will_County_IL/FeatureServer/0?token=D_nuNBIqs-eSw-9SGAdtGHxOVGD9pC8U4gGOmwpkyvPxwvwCO3eiuSxaK4gbuO6x5aDZil_xW_iObpWePfHpIO_Vf-Rj2J7B_XnG95zynEqa0iuT0KE_OwujjdUMszM3raRq0zW9WskdokSXWHn8tJGb55fPni3coDnntG0lTOi9u5mfWf4mLRIfLBshuC2vXCiNLVzicWbH39jCFokDiqDjt8YfOdfyasL4ljvNftkl9Jpkr-7OJNElSp2yY9SG",
outFields: ["*"],
popupTemplate: template
});
map.add(featureLayer);
view.popup.watch("selectedFeature", function(e) {
view.graphics.removeAll();
if (e && e.geometry) {
view.graphics.add(new Graphic({
geometry: e.geometry,
symbol: {
type: "simple-marker",
style: "circle",
size: 12,
outline: {
color: "#a900e6",
width: 2
}
}
}));
}
});
});
</script>
</head>
<body>
<div id="viewDiv"></div>
</span>
</body>
</html>
... View more
08-20-2018
01:10 PM
|
0
|
3
|
2539
|
|
POST
|
I'm attempting to create a simple app that has a point featurelayer with some attributes. When selecting a point to view its popup info, how can I also make it become highlighted? This link to sample code does something similar in that it draws a border on a polygon: PopupTemplate with promise | ArcGIS API for JavaScript 4.8 This sample code does basically what I want in that when you select a point it becomes highlighted and has a popup: CSVLayer - Project points on the fly | ArcGIS API for JavaScript 4.8 Here's what I have so far: <!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<meta name="viewport" content="initial-scale=1, maximum-scale=1, user-scalable=no">
<title>Intro to Popups</title>
<style>
html, body, #viewDiv {
padding: 0;
margin: 0;
height: 100%;
width: 100%;
}
#layerToggle {
top: 20px;
right: 20px;
position: absolute;
z-index: 99;
background-color: white;
border-radius: 8px;
padding: 10px;
opacity: 0.75;
}
</style>
<link rel="stylesheet" href="https://js.arcgis.com/4.8/esri/css/main.css">
<script src="https://js.arcgis.com/4.8/"></script>
<script>
require([
"esri/Map",
"esri/views/MapView",
"esri/layers/FeatureLayer", //Require the FeatureLayer module
"dojo/dom",
"dojo/on",
"dojo/domReady!"
],
function(
Map, MapView, FeatureLayer, dom, on
) {
var warming = new FeatureLayer({
url: "https://services.arcgis.com/fGsbyIOAuxHnF97m/arcgis/rest/services/Warming_Centers_in_and_aroud_Will_County/FeatureServer/0?token=TYud8dGZfk-2we1iW0XCIvmarr1E52rLmntGUN5A4k6BFN1awEyGdeMj_GzNnUyJuFOqApzxytM5h2UjsZOxIaoyJ5EMVM_j9I3c9E6vL0PhP00Jx6huW-O6Qg3PAHrNU_XXSZOpFTySW08pmtxEd3_p8nF5c2q6cbUeu3bxQD1OGOVYp7ZEOepNPi4HU9sIHOxfnauKfZc98pw0ZdYkSLb6zlViZjKL6perWl6Bwg1DVKvSlet2BcwgEwq2ad8R",
id: "warming",
minScale: 5000000
});
var boundary = new FeatureLayer({
url:
"http://services.arcgis.com/fGsbyIOAuxHnF97m/arcgis/rest/services/Will_County_Boundary/FeatureServer/0?token=6vBDftNXDqbaZH6fbfhuDCeGkJFaWMSEPaeYDt6PbDBfVacnSMMD7PZS3QeCW6mDqgSFMK0tRjMyJyrxDPQ3rcjTNUCFpi0pfpU_mFLoKXGlT5FTGTPH3GjMqL9iQCqh9_ihX8D1-DQ5N_ptC-ic9bKeDLjqU2xQOv8wIRPjX5VwrtsQz_ltdanO49SVPaJ8F7EN6qWZMgvFw9V0iBbV4Iu0khjfjhuswBNzhjJa3I6q0epaze9AsPRVvVXJ5wik",
id: "boundary",
minScale: 5000000
});
var map = new Map({
basemap: "streets-night-vector",
layers: [warming, boundary]
});
var view = new MapView({
container: "viewDiv",
map: map,
scale: 500000,
center: [-88, 41.5]
});
var template = { // autocasts as new PopupTemplate()
title: "{FACILITY_NAME}",
content: [{
type: "fields",
fieldInfos: [{
fieldName: "FACILITY_TYPE",
label: "Facility Type",
visible: true,
}, {
fieldName: "ADDRESS",
label: "Address",
visible: true,
}, {
fieldName: "PHONE_NUMBER",
label: "Phone",
visible: true,
}, {
fieldName: "HOURS",
label: "Hours",
visible: true,
}]
}]
};
var featureLayer = new FeatureLayer({
url: "https://services.arcgis.com/fGsbyIOAuxHnF97m/arcgis/rest/services/Warming_Centers_in_and_aroud_Will_County/FeatureServer/0?token=TYud8dGZfk-2we1iW0XCIvmarr1E52rLmntGUN5A4k6BFN1awEyGdeMj_GzNnUyJuFOqApzxytM5h2UjsZOxIaoyJ5EMVM_j9I3c9E6vL0PhP00Jx6huW-O6Qg3PAHrNU_XXSZOpFTySW08pmtxEd3_p8nF5c2q6cbUeu3bxQD1OGOVYp7ZEOepNPi4HU9sIHOxfnauKfZc98pw0ZdYkSLb6zlViZjKL6perWl6Bwg1DVKvSlet2BcwgEwq2ad8R",
outFields: ["*"],
popupTemplate: template,
dockEnabled: true,
});
map.add(featureLayer);
});
</script>
</head>
<body>
<div id="viewDiv"></div>
</span>
</body>
</html> And here is a seemingly relevant snippet from line 137 of the first sample code that I can't properly modify: view.popup.watch("selectedFeature", function(e) {
view.graphics.removeAll();
if (e && e.geometry) {
view.graphics.add(new Graphic({
geometry: e.geometry,
symbol: {
type: "simple-fill",
style: "none",
outline: {
color: "#6600FF",
width: 2
}
}
}));
}
});
... View more
08-17-2018
01:40 PM
|
0
|
2
|
2669
|
|
POST
|
Robert, Turns out I wasn't using Web AppBuilder Developer version. The entire time I thought I was since I had it downloaded and installed and the interfaces is exactly the same as non-developer version. The only difference is the url. In the case of the developer version it points to your machine, while the regular version points to your app on AGOL. So, i what I was doing was trying to deploy a downloaded version of the app from the Web AppBuilder through AGOL and that lead to all sorts of problems. It took a couple days of looking into server configerations and digging around, etc... You can see where this could be very confusing.
... View more
08-06-2018
01:18 PM
|
0
|
0
|
4769
|
|
POST
|
Robert, Thanks, I've only just begone to fill the developer role in my department so I wasn't aware of linters. I ran the json in a linter and fixed the two errors it found. After that it had no errors in that linter or any others. But, the app is still hung up with the same error message. The app runs on my local server. And that was without running the json through a linter.
... View more
08-06-2018
10:58 AM
|
0
|
2
|
4769
|
|
POST
|
ArcGIS Web Application Through my AGOL account, I created an app in WAB developer. It has two widgets and one feature layer, none of which require a subscription. After creating the app I downloaded the zip from my Content menu in AGOL. I extracted to a folder on our organizations server. In the Readme: it says to add the AppID to the config.json, which I did. I don't understand why it's asking to Add and Register the app when it's already in the Content with the App ID. (or maybe this is what the Note in the Readme is referring to). The error says it's unable to load the config.json. The only thing I did was add the AppID to the config file. I asked this same question in Geo Developers as well.
... View more
08-06-2018
09:38 AM
|
0
|
7
|
5285
|
|
POST
|
https://www.screencast.com/t/yETGFfbIBQ5 I followed this video and set up a self-signed certificate for my local server. Then I created a https site bindings in the IIS Manager, whereas before it the url to the app was http. It works now, but it's painfully slow and the side panel, top panel, widgets are missing. Only the basemap, points and popups are drawing. https://localhost/gisapi/Cooling/
... View more
08-06-2018
07:10 AM
|
0
|
0
|
4068
|
|
POST
|
I also closed all browsers and editors and reset the server. Then allowed full control of the wwwroot folder to all users: Still nothing.
... View more
08-03-2018
12:48 PM
|
0
|
0
|
4068
|
|
POST
|
I created this app in Web AppBuilder: ArcGIS Web Application I want to host it on our server. Here were my steps: 1. I first created a local test environment through the IIS Manager called C:\inetpub\wwwroot\GISApi 2. Through AGOL I clicked Create --> App: Using Web AppBuilder 3. Using Web AppBuilder developer version I created the app. It has two widgets, neither of which require a subscription to use. The content of the app (CSV file, hosted feature layer, web app, and the app) are all shared publicly. 4. After saving the finished app I went back to AGOL to download the zipfile. 5. I copied the zip to the GISApi folder then extracted it, and renamed the folder "Cooling". 6. I then tried running the app a few ways: a. I double clicked the index.html file, but the page never loaded: b. I put these URLs in the browser (Chrome) https://localhost/gisapi/Cooling/index.html , http://www.willcogis.org/website2014/gis/Cooling Here's what happened: There's no need for a proxy because the app's shared publicly. I then put a copy of the Cooling folder in our production folder. This is where the error message in the question title came from: I contacted ESRI and the tech downloaded the zip to his local server. He had the app up and running with no problems. I never went into the code at all so I'm guessing it might be my PC? At the moment I have a colleague in another department attempting to run the app from his PC on a different server.
... View more
08-03-2018
11:14 AM
|
0
|
4
|
5763
|
|
IDEA
|
For now I just double click the Layer in the Map Frame --> and in the Symbology tab click the color drop down --> Color Properties --> write down the RGB values. But, I'm all for having the Eye Dropper in Pro!!
... View more
08-02-2018
08:11 AM
|
0
|
1
|
8044
|
|
POST
|
Thanks for the help. @Dan I put mxd.save() after both try and except, but no difference. @michael I attempted saveACopy, but still no change in the data source. From what I read on Stack Exchange the findAndReplaceWorkspacePaths() function doesn't always work. I couldn't get it to work in three different scripts: arcpy - Getting findAndReplaceWorkspacePaths to work? - Geographic Information Systems Stack Exchange ArcGIS 10.2: ArcPy - how to replace workspace paths? - Geographic Information Systems Stack Exchange arcmap - ArcPy Changing Spatial Database Connection - Geographic Information Systems Stack Exchange Finally, I used this script, which has replaceWorkspaces(). And it worked. import os, arcpy
folderPath = r"\\gisfile\GISmaps\AtlasMaps\ATLAS_MAPS_18\Test Folder"
for fileName in [x for x in os.listdir(folderPath) if os.path.splitext(x)[1] == ".mxd"]:
fullPath = os.path.join(folderPath, fileName)
if os.path.isfile(fullPath):
mxd = arcpy.mapping.MapDocument(fullPath)
print "MXD: " + fileName
arcpy.env.workspace = fullPath
mxd.replaceWorkspaces("", "NONE", r"Database Connections\pathtoSDE.sde","SDE_WORKSPACE")
mxd.save()
del mxd
else:
print "error! {0} failed to be replaced".format(fullPath)
print "+++successfully changed data sources+++"
... View more
06-22-2018
02:26 PM
|
1
|
0
|
2604
|
|
POST
|
Thanks Dan, I see what you mean now. To run the program, I was using a shortcut of the Pythonwin.exe out of the 10.4 folder, I believe. That's what I'm doing now out of the 10.5 folder. In short, using a separate install of Python to run scripts that call the arcpy module will give you problems.
... View more
06-20-2018
01:00 PM
|
0
|
0
|
11215
|
| Title | Kudos | Posted |
|---|---|---|
| 1 | 11 hours ago | |
| 1 | 2 weeks ago | |
| 1 | 07-24-2025 01:27 PM | |
| 1 | 11-13-2025 08:22 AM | |
| 1 | 11-12-2025 08:37 AM |
| Online Status |
Offline
|
| Date Last Visited |
13 hours ago
|