|
POST
|
And here's my example of drawing a grid with random colours, which you could change to your own colour. < !DOCTYPE html >
< 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 > Shapes and Symbols < /title>
< link rel = "stylesheet"
href = "https://js.arcgis.com/3.20/esri/css/esri.css" >
< style >
html, body, #mapDiv {
padding: 0;
margin: 0;
height: 100 % ;
}
button {
display: block;
} < /style>
< script src = "https://js.arcgis.com/3.20/" > < /script> < script >
var map, tb;
require([
"esri/map", "esri/toolbars/draw", "esri/Color", "esri/graphic", "esri/geometry/Polygon",
"esri/symbols/SimpleMarkerSymbol", "esri/symbols/SimpleLineSymbol", "esri/symbols/SimpleFillSymbol",
"dojo/dom", "dojo/on", "dojo/domReady!"
], function(
Map, Draw, Color, Graphic, Polygon,
SimpleMarkerSymbol, SimpleLineSymbol, SimpleFillSymbol,
dom, on
) {
map = new Map("mapDiv", {
basemap: "streets",
center: [10, 10],
zoom: 5
});
map.on("load", addSquares);
function addSquares() {
var y = 0,
x = 0;
for (y = 0; y <= 20; y++) {
for (x = 0; x <= 20; x++) {
var polygonJson = {
"rings": [
[
[x, y],
[x + 1, y],
[x + 1, y + 1],
[x, y + 1]
]
],
"spatialReference": {
"wkid": 4326
}
};
var poly = new Polygon(polygonJson);
var fs = new SimpleFillSymbol(SimpleFillSymbol.STYLE_SOLID,
new SimpleLineSymbol(SimpleLineSymbol.STYLE_SOLID,
new Color([0, 0, 0]), 2),
new Color([parseInt(Math.random() * 255), parseInt(Math.random() * 255), parseInt(Math.random() * 255), 0.6])
);
map.graphics.add(new Graphic(poly, fs));
}
}
}
}); < /script> < /head >
< body >
< div id = "mapDiv" > < /div>
< /body> < /html >
... View more
04-11-2017
06:32 AM
|
2
|
0
|
1662
|
|
POST
|
Your expand factor is too large (60) - see Extent | API Reference | ArcGIS API for JavaScript 3.20
... View more
04-11-2017
12:24 AM
|
1
|
1
|
3377
|
|
POST
|
You could probably just add the token parameter and value to the service URL e.g. [URL] + "&token=abc123"
... View more
04-06-2017
11:02 PM
|
1
|
1
|
4930
|
|
POST
|
You should use the REST API identify and you can do it through an esri.request or Ajax call. For the bounds, just set it marginally wider than your query point. Here is an esri.request example that outputs the pixel value for 3 rasters to the console. esri.request({
url: "https://[server]/arcgis/rest/services/[service]/MapServer/identify",
content:{
f: "pjson",
geometry: "19,-33",
geometryType:'esriGeometryPoint',
imageDisplay:'600,550,96',
layers:"visible:11,12,13",
mapExtent:[16, -40, 21, -25].toString(),
sr:4326,
time:'',
tolerance:0,
returnGeometry:false,
maxAllowableOffset:''
},
handleAs: "json",
callbackParamName: "callback"
}).then(function(json){
for (var r in json.results){
res = json.results[r];
var val = res.attributes['Pixel Value'];
val = parseFloat(val).toFixed(1);
console.log(val);
}
});
... View more
04-06-2017
10:54 PM
|
0
|
0
|
1689
|
|
POST
|
You can use the "select-result" event to run your own function: Search | API Reference | ArcGIS API for JavaScript 3.20
... View more
03-27-2017
01:36 AM
|
2
|
2
|
2100
|
|
POST
|
Same issue still in version 3.20, but from this StackOverflow post it can be changed before adding the WMS layer to the map. wmsLayer.spatialReferences[0] = 3857;
map.addLayers([wmsLayer]);
... View more
03-22-2017
12:09 AM
|
0
|
0
|
2185
|
|
POST
|
Do you mean a symbology based on multiple values? I think it should be possible if you do it with a weighted index approach.
... View more
03-01-2017
02:57 AM
|
0
|
4
|
2411
|
|
POST
|
I would like to know why you want that folder accessed through port 6080, because that port is assigned to the ArcGIS Server site. So in effect you will have to make your "realestaste" folder part of the AGS site to have it accessed on port 6080.
... View more
02-28-2017
11:43 PM
|
3
|
1
|
5056
|
|
POST
|
I think you're having similar issues as described here: https://community.esri.com/thread/81811 and the advice by KOGuinn-esristaff sounds like it might help.
... View more
02-28-2017
09:51 PM
|
0
|
0
|
3208
|
|
POST
|
Have you tested if it works when you disable the server's firewall?
... View more
02-28-2017
09:46 PM
|
0
|
0
|
3208
|
|
POST
|
Ok, I'm not exactly sure what the issue is anymore, but port 6080 will allow you to connect to your ArcGIS Server instance. Your IP link is connecting through port 80, the default Web server port. You won't see that index page on port 6080.
... View more
02-28-2017
03:56 AM
|
2
|
5
|
3490
|
|
POST
|
Hi Maria Your error message was for the https connection. Just double check your connection string in ArcCatalog.
... View more
02-28-2017
03:43 AM
|
0
|
7
|
3490
|
|
POST
|
For HTTPS use port 6443 Ports used by ArcGIS Server—Installation Guides (10.5) | ArcGIS Enterprise
... View more
02-28-2017
02:32 AM
|
2
|
12
|
3490
|
|
POST
|
At least you know that according to the error code 12007 the server name is not resolving. (https://support.microsoft.com/en-us/help/193625/info-wininet-error-codes-12001-through-12156) Can you ping the server?
... View more
02-28-2017
01:38 AM
|
0
|
1
|
3208
|
| Title | Kudos | Posted |
|---|---|---|
| 1 | 03-22-2024 12:37 AM | |
| 1 | 10-02-2025 10:28 AM | |
| 1 | 09-17-2024 12:29 AM | |
| 1 | 03-15-2024 11:33 AM | |
| 1 | 03-13-2024 11:20 PM |
| Online Status |
Offline
|
| Date Last Visited |
4 weeks ago
|