|
POST
|
We're using the local 192.168.1.11 IP address. This is the address of our VM with web and ArcGIS servers.
... View more
01-08-2018
01:29 PM
|
0
|
2
|
1218
|
|
POST
|
I think we figured out that we were rerouting directly to the ArcGIS server. Now we're trying to figure out what's going on with port 80 on our firewall. It should go right to the wwwroot folder, but it's either timing out or leading to our firewall login page.
... View more
01-08-2018
12:56 PM
|
0
|
4
|
1218
|
|
POST
|
We are running Server 10.3.1. Our router and firewall was reset over the weekend and our website went down. We redirected port 80 to port 6080 (the ArcGIS Server) and our data and maps are viewable on the website again. We can see the REST services directory from the web on http://gis.ourwebsite.com/arcgis/rest. The problem is, none of the other files or directories in our wwwroot folder (which contains the arcgis web adapter) are accessible from that URL. For example, http://gis.ourwebsite.com/file.ext returns a 404 error. We have hyperlinks to these files on our website. I've tried enabling directory browsing on our default website directories in IIS 8.5, but this hasn't helped. Every folder underneath "arcgis" in this screenshot is inaccessible from the web.
... View more
01-08-2018
09:52 AM
|
0
|
6
|
1365
|
|
POST
|
It was set before publishing to show at all scale levels, so there isn't a min or max scale. There is just an extent Extent: XMin: 5029414.594027907 YMin: -3514203.489426465 XMax: 6130364.357942293 YMax: -1622093.9552736997 Spatial Reference: 3395 (3395)
... View more
01-04-2018
01:16 PM
|
0
|
1
|
3033
|
|
POST
|
I did the same with my layer and still can't see it.
... View more
01-04-2018
12:56 PM
|
0
|
4
|
3033
|
|
POST
|
OK, this works, but the layer is still not visible. I can also just change the projection to web mercator before I publish, no?
... View more
01-04-2018
12:49 PM
|
0
|
6
|
3033
|
|
POST
|
I want to set my map's extent to the extent of a feature layer. This layer will be updated regularly and the extent will be different every time. I'm following this example, and substituted my layer. It's not showing up, and the extent is far to the north of my feature. I'm getting this error in the console: Map: Geometry (wkid: 3395) cannot be converted to spatial reference of the map (wkid: 102100). I've tried setting the spatial reference of the map and the layer, to no avail. <html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<meta name="viewport" content="initial-scale=1, maximum-scale=1,user-scalable=no">
<title>Resource Loader Test</title>
<link rel="stylesheet" href="http://js.arcgis.com/3.23/dijit/themes/claro/claro.css">
<link rel="stylesheet" href="http://js.arcgis.com/3.23/esri/css/esri.css">
<script src="http://js.arcgis.com/3.23/"></script>
<script>
require([
"esri/map",
"esri/layers/FeatureLayer",
"esri/geometry/Extent",
"esri/SpatialReference",
"dojo/on",
"dojo/domReady!"
],
function (Map, FeatureLayer, Extent, SpatialReference, on) {
var typhoonOutlineURL = "http://<ourserver>/arcgis/rest/services/typhoon_outlines/MapServer/0";
var myLyr = new FeatureLayer(typhoonOutlineURL, {
mode: FeatureLayer.MODE_ONDEMAND,
});
myLyr.on('load', initMap);
function initMap() {
var mapMain = new Map("mapDiv", {
basemap: "dark-gray",
extent: myLyr.fullExtent,
zoom: 3
});
mapMain.addLayer(myLyr);
}
});
</script>
</head>
<body class="claro">
<div id="mapDiv" style="width:900px; height:600px;"></div>
<div id="mapInfo"></div>
</body>
</html>
... View more
01-04-2018
12:04 PM
|
0
|
10
|
4838
|
|
POST
|
The difference is this is a basic feature layer popup with attachment. No hyperlink with DOM ID. var popup = new Popup(popupOptions, domConstruct.create("div"));
var popupTemplate = new PopupTemplate({
title: "Storm: {name}",
showAttachments:true
});
... View more
01-04-2018
10:34 AM
|
0
|
1
|
487
|
|
POST
|
I'm revisiting this thread with a similar question. Would it be possible to close a popup after clicking on a linked attachment in a feature layer?
... View more
01-04-2018
09:56 AM
|
0
|
3
|
487
|
|
POST
|
There is one dynamic map service layer with rasters and polygons. I changed the identifyParams to layerIds = [1,2,3,4,5]; Those are the states layers. I'm still getting the same result. When I click on Colorado, map.setExtent(extent); zooms to the middle of the ocean. Here is the script: <html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<meta name="viewport" content="initial-scale=1, maximum-scale=1,user-scalable=no">
<title>Forecast Analysis</title>
<link rel="stylesheet" href="http://js.arcgis.com/3.23/dijit/themes/claro/claro.css">
<link rel="stylesheet" type="text/css" href="http://js.arcgis.com/3.23/esri/css/esri.css">
<style>
html, body, .container, #map {
height: 700px;
width: 100%;
margin: 0;
padding: 0;
margin: 0;
font-family: "arial";
}
#HomeButton {
position: absolute;
top: 95px;
left: 20px;
z-index: 50;
}
<!-- #layerListPane {
position: absolute;
top: 0px;
right: 0px;
width: 230px;
z-index: 101;
padding: 0px;
bottom: 720px;
box-shadow: 0 0 5px 0 #DDD;
background-color:;
}
.esriLayerList .esriList {
background-color:white;
}
.esriLayerList .esriTitle
background-color: ;
border-bottom: none;
}
.esriLayerList .esriList ul {
background-color: ;
} -->
.esriScalebar {
padding: 20px 20px;
}
.esriLayer {
background-color:;
}
.esriPopup .titleButton.maximize {
display: none;
}
.esriPopup .zoomTo { display: none; }
.attachmentsSection div:first-child{
display:none;
}
</style>
<script>var dojoConfig = { parseOnLoad: true };</script>
<script src="http://js.arcgis.com/3.23/"></script>
<script>
var map;
require([
"esri/config",
"esri/map",
"esri/geometry/webMercatorUtils",
"esri/graphicsUtils",
"esri/tasks/GeometryService",
"esri/geometry/Point",
"esri/geometry/Extent",
"esri/InfoTemplate",
"esri/layers/ArcGISDynamicMapServiceLayer",
"esri/dijit/Popup",
"esri/dijit/LayerList",
"esri/arcgis/utils",
"esri/dijit/PopupTemplate",
"esri/layers/FeatureLayer",
"esri/symbols/SimpleMarkerSymbol",
"esri/tasks/query",
"esri/tasks/IdentifyTask",
"esri/tasks/IdentifyParameters",
"esri/tasks/QueryTask",
"esri/dijit/BasemapGallery",
"esri/dijit/HomeButton",
"esri/graphic",
"dojo/dom-construct",
"esri/Color",
"dojo/dom",
"dojo/parser",
"dojo/_base/array",
"dojo/dom-class",
"dojo/query",
"dijit/layout/BorderContainer",
"dijit/layout/ContentPane",
"dijit/TitlePane",
"dojo/domReady!"
], function (
esriConfig, Map, webMercatorUtils,graphicsUtils,
GeometryService, Point, Extent,InfoTemplate,
ArcGISDynamicMapServiceLayer,
Popup, LayerList, arcgisUtils, PopupTemplate, FeatureLayer,
SimpleMarkerSymbol, Query,IdentifyTask, IdentifyParameters, QueryTask,
BasemapGallery, HomeButton, Graphic, domConstruct,
Color, dom, parser,arrayUtils, domClass,query
) {
parser.parse();
esriConfig.defaults.geometryService = new GeometryService("http://<ourserver>/arcgis/rest/services/Utilities/Geometry/GeometryServer");
var popupOptions = {
markerSymbol: new SimpleMarkerSymbol("circle", 32, null,
new Color([0, 0, 0, 0.25])),
marginLeft: "20",
marginTop: "20"
};
var popup = new Popup(popupOptions, domConstruct.create("div"));
map = new Map("map", {
basemap: "gray",
center: [-85, 38.5],
zoom: 4,
maxZoom: 8,
minZoom: 4,
infoWindow: popup
});
map.on("load", mapReady);
var home = new HomeButton({
map: map
}, "HomeButton");
home.startup();
var roadsURL = "http://<ourserver>/arcgis/rest/services/Snow_Roads/MapServer";
var roadsLayer = new ArcGISDynamicMapServiceLayer(roadsURL,{ opacity: .85});
map.addLayer(roadsLayer);
//create layer list widget
var myWidget = new LayerList({
map: map,
layers: [{
layer: roadsLayer,
id: "Interstate Snow Conditions",
showsubLayers: true,
showLegend: false
}],
}, "layerList");
myWidget.startup();
function expandLayerList() {
query('.esriLayer').forEach(function(node){
domClass.add(node, "esriListExpand");
});
query('.esriToggleButton').forEach(function(node){
domClass.replace(node, "esri-icon-down", "esri-icon-right");
});
}
myWidget.on('load', function(){
expandLayerList();
});
var identifyTask, identifyParams;
function mapReady () {
map.on("click",executeIdentifyTask);
//create identify tasks and setup parameters
identifyTask = new IdentifyTask(roadsURL);
identifyParams = new IdentifyParameters();
identifyParams.tolerance = 7;
identifyParams.returnGeometry = true;
identifyParams.width = map.width;
identifyParams.height = map.height;
};
function executeIdentifyTask (event) {
map.infoWindow.clearFeatures();
identifyParams.geometry = event.mapPoint;
identifyParams.mapExtent = map.extent;
identifyParams.layerIds = [1,2,3,4,5];
var deferred = identifyTask
.execute(identifyParams);
deferred.addCallback(function (response) {
// response is an array of identify result objects
// Let's return an array of features.
return arrayUtils.map(response, function (result) {
var feature = result.feature;
var layerName = result.layerName;
var extent = feature.geometry;
map.setExtent(extent);
console.log(extent);
var iTemplate;
if(result.layerName === "Forecast 18 Hours"
|| result.layerName === "Past 6 Hours"
|| result.layerName === "Past 24 Hours"
|| result.layerName === "Past 48 Hours"
|| result.layerName === "Past 72 Hours"){
iTemplate = new InfoTemplate(layerName,"State: ${name}<br>No Snow: ${No_Snow}<br>Trace: ${Trace}<br>0.1 to 1 Inch: ${One_Inch}<br>1 to 2 Inches: ${Two_Inch}<br>2 to 6 Inches: ${Six_Inch}<br>6 to 12 Inches: ${Twelve_In}<br>12 to 18 Inches: ${Eightn}<br>Above 18 Inches: ${Above_18}"
);
feature.setInfoTemplate(iTemplate);
}
return feature;
});
});
// InfoWindow expects an array of features from each deferred
// object that you pass. If the response from the task execution
// above is not an array of features, then you need to add a callback
// like the one above to post-process the response and return an
// array of features.
map.infoWindow.setFeatures([deferred]);
map.infoWindow.show(event.mapPoint);
map.infoWindow.resize(225,200)
}
map.on("load", function() {
//after map loads, connect to listen to mouse move & drag events
map.on("mouse-move", showCoordinates);
map.on("mouse-drag", showCoordinates);
});
function showCoordinates(evt) {
//the map is in web mercator but display coordinates in geographic (lat, long)
var mp = webMercatorUtils.webMercatorToGeographic(evt.mapPoint);
//display mouse coordinates
dom.byId("info").innerHTML = "Longitude: " + mp.x.toFixed(3) + " " + "Latitude: " + mp.y.toFixed(3);
}
});
</script>
</head>
<body class="claro">
<div data-dojo-type="dijit/layout/BorderContainer" data-dojo-props="design:'headline'"
style="width: 100%; height: 100%; margin: 0;">
<div id="map" data-dojo-type="dijit/layout/ContentPane" data-dojo-props="region:'center'">
<div id="layerListPane">
<div id="layerList"></div>
</div>
<span id="info" style="font-family:arial;position:absolute;left:15px; bottom:5px; background-color:lightgray; opacity: 0.70; z-index:50;"></span>
<div id="HomeButton"></div>
<div style="position:absolute; left:75px; top:20px; z-Index:999;">
</div>
</div>
</div>
</div>
</body>
</html>
... View more
12-20-2017
12:58 PM
|
0
|
1
|
1084
|
|
POST
|
I need to figure out how to get the extent for the State attribute of the feature. var state = feature.attributes['name'];
... View more
12-20-2017
12:44 PM
|
0
|
3
|
1084
|
|
POST
|
{type: "polygon", rings: Array(1), _ring: 0, spatialReference: {…}} rings:[Array(170)] spatialReference: latestWkid:3857 wkid:102100 __proto__:Object type:"polygon"
... View more
12-20-2017
12:42 PM
|
0
|
4
|
1084
|
|
POST
|
I tried this, but it just zoomed to the middle of the globe. When I console logged extent, it gave me the layer name, of course. var extent = feature.geometry;
map.setExtent(extent);
... View more
12-20-2017
12:25 PM
|
0
|
6
|
1084
|
|
POST
|
Could I also do this inside an identify task? Right now I'm clicking on the state to get statistics in the popup. var identifyTask, identifyParams;
function mapReady () {
map.on("click",executeIdentifyTask);
//create identify tasks and setup parameters
identifyTask = new IdentifyTask(roadsURL);
identifyParams = new IdentifyParameters();
identifyParams.tolerance = 7;
identifyParams.returnGeometry = true;
identifyParams.width = map.width;
identifyParams.height = map.height;
};
function executeIdentifyTask (event) {
map.infoWindow.clearFeatures();
identifyParams.geometry = event.mapPoint;
identifyParams.mapExtent = map.extent;
identifyParams.layerIds = roadsLayer.visibleLayers;
var deferred = identifyTask
.execute(identifyParams);
deferred.addCallback(function (response) {
// response is an array of identify result objects
// Let's return an array of features.
return arrayUtils.map(response, function (result) {
var feature = result.feature;
var layerName = result.layerName;
var iTemplate;
if(result.layerName === "Forecast 18 Hours"
|| result.layerName === "Past 6 Hours"
|| result.layerName === "Past 24 Hours"
|| result.layerName === "Past 48 Hours"
|| result.layerName === "Past 72 Hours"){
iTemplate = new InfoTemplate(layerName,"State: ${name}<br>No Snow: ${No_Snow}<br>Trace: ${Trace}<br>0.1 to 1 Inch: ${One_Inch}<br>1 to 2 Inches: ${Two_Inch}<br>2 to 6 Inches: ${Six_Inch}<br>6 to 12 Inches: ${Twelve_In}<br>12 to 18 Inches: ${Eightn}<br>Above 18 Inches: ${Above_18}"
);
feature.setInfoTemplate(iTemplate);
}
return feature;
});
});
map.infoWindow.setFeatures([deferred]);
map.infoWindow.show(event.mapPoint);
map.infoWindow.resize(225,200)
}
... View more
12-20-2017
11:17 AM
|
0
|
8
|
3003
|
|
POST
|
Now I have a dynamic map service layer with multiple rasters and continental US polygons inside. I'd like to be able to zoom to each individual state when clicked. Is this possible?
... View more
12-19-2017
02:08 PM
|
0
|
10
|
3003
|
| Title | Kudos | Posted |
|---|---|---|
| 1 | 04-08-2019 09:21 AM | |
| 1 | 04-05-2019 04:21 PM | |
| 2 | 04-01-2019 10:11 AM | |
| 1 | 03-22-2019 09:30 AM | |
| 1 | 05-16-2019 08:42 AM |
| Online Status |
Offline
|
| Date Last Visited |
11-11-2020
02:24 AM
|