POST
|
I have a single map point which i'm adding to 2 different graphics layers. The point appears on layer 1 or 2, depending on which you select first. However, when you select the other layer the point is not visible, you need to pan the map to make it appear. Why does adding the same point to 2 different layers stop the point displaying until panned? thanks I've removed my post from Friday and created a simpler example: <!DOCTYPE html>
<html lang="en">
<head>
<script type="text/javascript" src="https://js.arcgis.com/3.29/"></script>
<link rel="stylesheet" href="https://js.arcgis.com/3.29/esri/css/esri.css" type="text/css">
<script type="text/javascript">
var map;
var locator;
require([
"esri/map",
"esri/SpatialReference",
"esri/geometry/Point",
"esri/InfoTemplate",
"esri/graphic",
"esri/symbols/PictureMarkerSymbol",
"esri/layers/FeatureLayer",
"esri/SpatialReference",
"esri/InfoTemplate"
],
function(
Map,
SpatialReference,
Point,
InfoTemplate,
Graphic,
PictureMarkerSymbol,
FeatureLayer,
SpatialReference,
InfoTemplate
) {
var wkid = 102100;
map = new Map("map", {
basemap: "streets",
zoom: 11,
maxZoom: 18,
minZoom: 1,
center: [-4.3864,55.7819]
});
map.on("load", function(e) {
// map has loaded
plotMapItems();
});
function plotMapItems() {
map.graphics.enableMouseEvents();
var pictureSymbol = new PictureMarkerSymbol({
"url": "https://static.arcgis.com/images/Symbols/Shapes/BluePin1LargeB.png",
"height":64,
"width":64,
"angle": 0,
"yoffset": 24,
"type":"esriPMS"
});
// Create the different map layers
myLayer1 = new esri.layers.GraphicsLayer();
myLayer1.id = 'myLayer1';
myLayer1.visible = false;
map.addLayer(myLayer1);
myLayer2 = new esri.layers.GraphicsLayer();
myLayer2.id = 'myLayer2';
myLayer2.visible = false;
map.addLayer(myLayer2);
var x = "-500031.1921038252";
var y = "7511922.076282063";
var spatial = new SpatialReference({ wkid: wkid });
var point = new Point(x, y, spatial);
var pointAttributes = { Test: "test" };
var pointInfoTemplate = new InfoTemplate("Request");
var pointGraphic = new Graphic(point, pictureSymbol, pointAttributes, pointInfoTemplate);
// Add the point to both layers
myLayer1.add(pointGraphic);
myLayer2.add(pointGraphic);
}
}); //End of function
function showMapLayer(layerID){
// Hide all layers
map.getLayer("myLayer1").hide();
map.getLayer("myLayer2").hide();
console.clear();
console.log(map.getLayer(layerID));
var x = map.getLayer(layerID);
x.show();
x.refresh();
var gLayerCount = x.graphics.length;
document.getElementById("layerItems").innerHTML = "Layer '" + layerID + "' has " + gLayerCount + " marker points.";
}
</script>
</head>
<body>
<div id="mapContainer" style="border: 1px solid #000; width: 970px; height: 400px; margin-bottom: 1em; ">
<div id="map"></div>
</div>
<form>
<input type="radio" id="myLayer1" name="layer" value="myLayer1" onclick="showMapLayer(this.value);">
<label for="myLayer1">myLayer1</label>
<input type="radio" id="myLayer2" name="layer" value="myLayer2" onclick="showMapLayer(this.value);">
<label for="myLayer2">myLayer2</label>
</form>
<br />
<h3 id="layerItems"></h3>
</body>
</html>
... View more
07-27-2020
04:37 AM
|
0
|
0
|
268
|
POST
|
I've been asked to display all maps as British National Grid. I have managed get this working using the OS Open Raster REST service and using some example code found here: https://codepen.io/digz6666/pen/wPwPbW We subscribe to ViaEuropa, we have access to more detailed master maps. There documentations is here: WMTS | viaEuropa Documentation I'm trying to use this service on my map, but i'm not sure how. When i try updating the code above from codepen with the following (substituting my details in the curly brackets) url https://tile.viaeuropa.uk.com/{id}/{map}/wmts/1.0.0/WMTSCapabilities.xml the map doesn't load. Are they supplying basemaps or layers? This is the xml response i see when i view WMTSCapabilities.xml in the browser. How do i use this data with arcgis js api 3.29? This XML file does not appear to have any style information associated with it. The document tree is shown below.
<Capabilities xmlns="http://www.opengis.net/wmts/1.0" xmlns:ows="http://www.opengis.net/ows/1.1" xmlns:xlink="http://www.w3.org/1999/xlink" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:gml="http://www.opengis.net/gml" xsi:schemaLocation="http://www.opengis.net/wmts/1.0 http://schemas.opengis.net/wmts/1.0/wmtsGetCapabilities_response.xsd" version="1.0.0">
<!-- Service Identification -->
<ows:ServiceIdentification>
<ows:Title>viaEuropa WMTS (m0105)</ows:Title>
<ows:Abstract xml:lang="en">
viaEuropa WMTS from Europa Technologies. https://www.europa.uk.com
</ows:Abstract>
<ows:ServiceType>OGC WMTS</ows:ServiceType>
<ows:ServiceTypeVersion>1.0.0</ows:ServiceTypeVersion>
</ows:ServiceIdentification>
<ows:ServiceProvider>
<ows:ProviderName>Europa Technologies Ltd.</ows:ProviderName>
<ows:ProviderSite xlink:href="https://www.europa.uk.com"/>
</ows:ServiceProvider>
<!-- Operations Metadata -->
<ows:OperationsMetadata>
<ows:Operation name="GetCapabilities">
<ows:DCP>
<ows:HTTP>
<ows:Get xlink:href="https://tile.publicsectormapping.gov.scot/*REDACTED*/m0105/wmts/1.0.0/WMTSCapabilities.xml">
<ows:Constraint name="GetEncoding">
<ows:AllowedValues>
<ows:Value>RESTful</ows:Value>
</ows:AllowedValues>
</ows:Constraint>
</ows:Get>
<ows:Get xlink:href="https://tile.publicsectormapping.gov.scot/*REDACTED*/m0105/wmts?">
<ows:Constraint name="GetEncoding">
<ows:AllowedValues>
<ows:Value>KVP</ows:Value>
</ows:AllowedValues>
</ows:Constraint>
</ows:Get>
</ows:HTTP>
</ows:DCP>
</ows:Operation>
<ows:Operation name="GetTile">
<ows:DCP>
<ows:HTTP>
<ows:Get xlink:href="https://tile.publicsectormapping.gov.scot/*REDACTED*/m0105/">
<ows:Constraint name="GetEncoding">
<ows:AllowedValues>
<ows:Value>RESTful</ows:Value>
</ows:AllowedValues>
</ows:Constraint>
</ows:Get>
<ows:Get xlink:href="https://tile.publicsectormapping.gov.scot/*REDACTED*/m0105/wmts?">
<ows:Constraint name="GetEncoding">
<ows:AllowedValues>
<ows:Value>KVP</ows:Value>
</ows:AllowedValues>
</ows:Constraint>
</ows:Get>
</ows:HTTP>
</ows:DCP>
</ows:Operation>
</ows:OperationsMetadata>
<!-- Contents -->
<Contents>
<Layer>
<ows:Title>
m0105 - Ordnance Survey (GB) premium raster stack to MM Topo (BNG)
</ows:Title>
<ows:Identifier>viaEuropa_m0105</ows:Identifier>
<ows:WGS84BoundingBox crs="urn:ogc:def:crs:OGC:2:84">
<ows:LowerCorner>-10.0 49.6</ows:LowerCorner>
<ows:UpperCorner>4.55 62.7</ows:UpperCorner>
</ows:WGS84BoundingBox>
<ows:BoundingBox crs="urn:ogc:def:crs:EPSG::27700">
<ows:LowerCorner>0 0</ows:LowerCorner>
<ows:UpperCorner>700000 1300000</ows:UpperCorner>
</ows:BoundingBox>
<Style isDefault="true">
<ows:Identifier>default</ows:Identifier>
</Style>
<Format>image/png</Format>
<TileMatrixSetLink>
<TileMatrixSet>BNGCompatible</TileMatrixSet>
</TileMatrixSetLink>
<ResourceURL format="image/png" resourceType="tile" template="https://tile.publicsectormapping.gov.scot/*REDACTED*/m0105/wmts/tile_inv/{TileMatrix}/{TileCol}/{TileRow}.png"/>
</Layer>
<TileMatrixSet>
<ows:Title>BritishNationalGridCompatible</ows:Title>
<ows:Abstract>British National Grid tile matrix set</ows:Abstract>
<ows:Identifier>BNGCompatible</ows:Identifier>
<ows:SupportedCRS>urn:ogc:def:crs:EPSG::27700</ows:SupportedCRS>
<TileMatrix>
<ows:Identifier>0</ows:Identifier>
<ScaleDenominator>10000000</ScaleDenominator>
<TopLeftCorner>0 1433600</TopLeftCorner>
<TileWidth>256</TileWidth>
<TileHeight>256</TileHeight>
<MatrixWidth>1</MatrixWidth>
<MatrixHeight>2</MatrixHeight>
</TileMatrix>
<TileMatrix>
<ows:Identifier>1</ows:Identifier>
<ScaleDenominator>5000000</ScaleDenominator>
<TopLeftCorner>0 1433600</TopLeftCorner>
<TileWidth>256</TileWidth>
<TileHeight>256</TileHeight>
<MatrixWidth>2</MatrixWidth>
<MatrixHeight>4</MatrixHeight>
</TileMatrix>
<TileMatrix>
<ows:Identifier>2</ows:Identifier>
<ScaleDenominator>2500000</ScaleDenominator>
<TopLeftCorner>0 1433600</TopLeftCorner>
<TileWidth>256</TileWidth>
<TileHeight>256</TileHeight>
<MatrixWidth>4</MatrixWidth>
<MatrixHeight>8</MatrixHeight>
</TileMatrix>
<TileMatrix>
<ows:Identifier>3</ows:Identifier>
<ScaleDenominator>1000000</ScaleDenominator>
<TopLeftCorner>0 1433600</TopLeftCorner>
<TileWidth>256</TileWidth>
<TileHeight>256</TileHeight>
<MatrixWidth>10</MatrixWidth>
<MatrixHeight>20</MatrixHeight>
</TileMatrix>
<TileMatrix>
<ows:Identifier>4</ows:Identifier>
<ScaleDenominator>500000</ScaleDenominator>
<TopLeftCorner>0 1433600</TopLeftCorner>
<TileWidth>256</TileWidth>
<TileHeight>256</TileHeight>
<MatrixWidth>20</MatrixWidth>
<MatrixHeight>40</MatrixHeight>
</TileMatrix>
<TileMatrix>
<ows:Identifier>5</ows:Identifier>
<ScaleDenominator>250000</ScaleDenominator>
<TopLeftCorner>0 1433600</TopLeftCorner>
<TileWidth>256</TileWidth>
<TileHeight>256</TileHeight>
<MatrixWidth>40</MatrixWidth>
<MatrixHeight>80</MatrixHeight>
</TileMatrix>
<TileMatrix>
<ows:Identifier>6</ows:Identifier>
<ScaleDenominator>100000</ScaleDenominator>
<TopLeftCorner>0 1433600</TopLeftCorner>
<TileWidth>256</TileWidth>
<TileHeight>256</TileHeight>
<MatrixWidth>100</MatrixWidth>
<MatrixHeight>200</MatrixHeight>
</TileMatrix>
<TileMatrix>
<ows:Identifier>7</ows:Identifier>
<ScaleDenominator>75000</ScaleDenominator>
<TopLeftCorner>0 1430016</TopLeftCorner>
<TileWidth>256</TileWidth>
<TileHeight>256</TileHeight>
<MatrixWidth>133</MatrixWidth>
<MatrixHeight>266</MatrixHeight>
</TileMatrix>
<TileMatrix>
<ows:Identifier>8</ows:Identifier>
<ScaleDenominator>50000</ScaleDenominator>
<TopLeftCorner>0 1433600</TopLeftCorner>
<TileWidth>256</TileWidth>
<TileHeight>256</TileHeight>
<MatrixWidth>200</MatrixWidth>
<MatrixHeight>400</MatrixHeight>
</TileMatrix>
<TileMatrix>
<ows:Identifier>9</ows:Identifier>
<ScaleDenominator>25000</ScaleDenominator>
<TopLeftCorner>0 1433600</TopLeftCorner>
<TileWidth>256</TileWidth>
<TileHeight>256</TileHeight>
<MatrixWidth>400</MatrixWidth>
<MatrixHeight>800</MatrixHeight>
</TileMatrix>
<TileMatrix>
<ows:Identifier>10</ows:Identifier>
<ScaleDenominator>10000</ScaleDenominator>
<TopLeftCorner>0 1433600</TopLeftCorner>
<TileWidth>256</TileWidth>
<TileHeight>256</TileHeight>
<MatrixWidth>1000</MatrixWidth>
<MatrixHeight>2000</MatrixHeight>
</TileMatrix>
<TileMatrix>
<ows:Identifier>11</ows:Identifier>
<ScaleDenominator>5000</ScaleDenominator>
<TopLeftCorner>0 1433600</TopLeftCorner>
<TileWidth>256</TileWidth>
<TileHeight>256</TileHeight>
<MatrixWidth>2000</MatrixWidth>
<MatrixHeight>4000</MatrixHeight>
</TileMatrix>
<TileMatrix>
<ows:Identifier>12</ows:Identifier>
<ScaleDenominator>2500</ScaleDenominator>
<TopLeftCorner>0 1433600</TopLeftCorner>
<TileWidth>256</TileWidth>
<TileHeight>256</TileHeight>
<MatrixWidth>4000</MatrixWidth>
<MatrixHeight>8000</MatrixHeight>
</TileMatrix>
<TileMatrix>
<ows:Identifier>13</ows:Identifier>
<ScaleDenominator>1250</ScaleDenominator>
<TopLeftCorner>0 1433600</TopLeftCorner>
<TileWidth>256</TileWidth>
<TileHeight>256</TileHeight>
<MatrixWidth>8000</MatrixWidth>
<MatrixHeight>16000</MatrixHeight>
</TileMatrix>
<TileMatrix>
<ows:Identifier>14</ows:Identifier>
<ScaleDenominator>625</ScaleDenominator>
<TopLeftCorner>0 1433600</TopLeftCorner>
<TileWidth>256</TileWidth>
<TileHeight>256</TileHeight>
<MatrixWidth>16000</MatrixWidth>
<MatrixHeight>32000</MatrixHeight>
</TileMatrix>
<TileMatrix>
<ows:Identifier>15</ows:Identifier>
<ScaleDenominator>312.5</ScaleDenominator>
<TopLeftCorner>0 1433600</TopLeftCorner>
<TileWidth>256</TileWidth>
<TileHeight>256</TileHeight>
<MatrixWidth>32000</MatrixWidth>
<MatrixHeight>64000</MatrixHeight>
</TileMatrix>
</TileMatrixSet>
</Contents>
<ServiceMetadataURL xlink:href="https://tile.publicsectormapping.gov.scot/*REDACTED*/m0105/wmts/1.0.0/WMTSCapabilities.xml"/>
</Capabilities>
... View more
03-19-2020
04:37 AM
|
0
|
1
|
1074
|
POST
|
Hi Robert, is it possible to put the overLayGra onto a separate graphics layer? The wider context is that i'm plotting a marker on the map, each time the map is clicked i clear out any previous points using: map.graphics.clear(); This is causing the overlay graphic to disapear when the map is clicked twice! I have commented out this line: // map.graphics.add(overLayGra); // Add the overlay to a separate Graphics Layer overLayGraLayer = new esri.layers.GraphicsLayer(); overLayGraLayer.id = 'overLayGraLayer'; map.addLayer(overLayGraLayer); overLayGraLayer.graphics.add(overLayGra); But i get an error: TypeError: overLayGraLayer.graphics.add is not a function Basically, would would like it that map.graphics.clear() has no effect on the overlay graphic. thanks for your help
... View more
01-21-2020
08:29 AM
|
0
|
1
|
603
|
POST
|
Hi, i'm following this example to map the boundary of my authority. In my code below, i highlight the counties with a red border and dim the layer. I would like to reverse the dim effect, instead, i would like the basemap to be dimmed and the feature layer not dimmed. How can i achieve this effect? I have followed this example, which dims the basemap, but it also dims my feature layer. I don't want my feature layer to be dimmed, just everything that surrounds it. https://community.esri.com/thread/94149 thanks Feature layer hover | ArcGIS API for JavaScript 3.31 <!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>Feature Layer - display results as an InfoWindow onHover</title>
<link rel="stylesheet" href="https://js.arcgis.com/3.31/dijit/themes/tundra/tundra.css">
<link rel="stylesheet" href="https://js.arcgis.com/3.31/esri/css/esri.css">
<style>
html, body, #mapDiv {
padding:0;
margin:0;
height:100%;
}
#mapDiv {
position: relative;
}
</style>
<script src="https://js.arcgis.com/3.31/"></script>
<script>
var map, dialog;
require([
"esri/map", "esri/layers/FeatureLayer",
"esri/symbols/SimpleFillSymbol", "esri/symbols/SimpleLineSymbol",
"esri/renderers/SimpleRenderer", "esri/graphic", "esri/lang",
"esri/Color", "dojo/number", "dojo/dom-style",
"dijit/TooltipDialog", "dijit/popup", "dojo/domReady!"
], function(
Map, FeatureLayer,
SimpleFillSymbol, SimpleLineSymbol,
SimpleRenderer, Graphic, esriLang,
Color, number, domStyle,
TooltipDialog, dijitPopup
) {
map = new Map("mapDiv", {
basemap: "topo",
center: [-80.94, 33.646],
zoom: 8,
slider: false
});
var southCarolinaCounties = new FeatureLayer("https://sampleserver1.arcgisonline.com/ArcGIS/rest/services/Demographics/ESRI_Census_USA/MapServer/3", {
mode: FeatureLayer.MODE_SNAPSHOT,
outFields: ["NAME", "POP2000", "POP2007", "POP00_SQMI", "POP07_SQMI"]
});
southCarolinaCounties.setDefinitionExpression("STATE_NAME = 'South Carolina'");
var symbol = new SimpleFillSymbol(
SimpleFillSymbol.STYLE_SOLID,
new SimpleLineSymbol(
SimpleLineSymbol.STYLE_SOLID,
new Color([255,0,0]), 2
),
new Color([125,125,125,0.25])
);
southCarolinaCounties.setRenderer(new SimpleRenderer(symbol));
map.addLayer(southCarolinaCounties);
map.on("load", function(){
map.graphics.enableMouseEvents();
});
});
</script>
</head>
<body class="tundra">
<div id="mapDiv">
</div>
</body>
</html>
... View more
01-21-2020
03:47 AM
|
0
|
4
|
659
|
POST
|
Hi Robert, thank you for checking this for me. Ok, so I have managed to get it working. 1) I am using the FeatureServer instead of the MapServer 2) I am using the POST button rather than GET 3) I've entered raw geometry, no encodeding 4) The Geometry type set to Polygon The input geometry is now returning the 3 properties contained within the boundary I've included a print screen of the full request:
... View more
01-06-2020
04:15 AM
|
0
|
0
|
1430
|
POST
|
Hi Ken, i have checked those posts, the second one seems more relevant... I have implemented the solution, the good news is that the multipleDefine error has gone, but i still get the scriptError, which points to the arcgis version of JQuery. var map;
console.log("jQuery.fn.jquery: " + jQuery.fn.jquery);
dojoConfig: {
aliases: [
['jquery', 'https://ajax.googleapis.com/ajax/libs/jquery/2.2.4/jquery.min.js' ]
]
}
require([
"jquery",
"esri/map",
"esri/geometry/Extent",
"esri/SpatialReference",
"esri/dijit/Search"
],
function(
$,
Map,
Extent,
SpatialReference,
Search
) { Error Screenshot:
... View more
12-20-2019
06:47 AM
|
0
|
0
|
2753
|
POST
|
Hi, i'm getting an error, the console is complaining about multipleDefine in init.js It looks like an issue is with JQuery. I'm embedding my map on a 3rd party supplier form builder, they are using JQuery too: https://ajax.googleapis.com/ajax/libs/jquery/2.2.4/jquery.min.js How can i stop this conflict? I don't have any control over the 3rd party code. Can i tell esri jsapi to wait on the 3rd party version of jquery to download and use that instead?
... View more
12-20-2019
05:44 AM
|
0
|
2
|
3073
|
POST
|
Hi Robert, i have tried changing Geometry Type to point and I get No records found.
... View more
12-17-2019
05:54 AM
|
0
|
2
|
1430
|
POST
|
Looking at the header for the JSAPI query, parsed request looks like this, so geometry is expecting rings (which i presume is my circle): f: json
where:
returnGeometry: true
spatialRel: esriSpatialRelIntersects
geometry: {"rings":[[[-475303.63745402906,7507176.940403111],[-475304.29482658487,7507189.483818703],[-475306.259741941,7507201.88980601],[-475309.51067207364,7507214.022442436],[-475314.011999112,7507225.7488002805],[-475319.71440557495,7507236.940403111],[-475326.5554147041,7507247.474633386],[-475334.4600749718,7507257.236075874],[-475343.341781266,7507266.117782169],[-475353.103223754,7507274.022442436],[-475363.63745402906,7507280.863451566],[-475374.82905685995,7507286.565858029],[-475386.5554147041,7507291.067185067],[-475398.6880511309,7507294.318115199],[-475411.09403843695,7507296.283030556],[-475423.63745402906,7507296.940403111],[-475436.18086962117,7507296.283030556],[-475448.5868569272,7507294.318115199],[-475460.71949335403,7507291.067185067],[-475472.44585119816,7507286.565858029],[-475483.63745402906,7507280.863451566],[-475494.17168430414,7507274.022442436],[-475503.93312679214,7507266.117782169],[-475512.81483308633,7507257.236075874],[-475520.71949335403,7507247.474633386],[-475527.56050248316,7507236.940403111],[-475533.26290894614,7507225.7488002805],[-475537.7642359845,7507214.022442436],[-475541.0151661171,7507201.88980601],[-475542.98008147324,7507189.483818703],[-475543.63745402906,7507176.940403111],[-475542.98008147324,7507164.396987519],[-475541.0151661171,7507151.991000213],[-475537.7642359845,7507139.858363787],[-475533.26290894614,7507128.132005942],[-475527.56050248316,7507116.940403111],[-475520.71949335403,7507106.406172836],[-475512.81483308633,7507096.644730348],[-475503.93312679214,7507087.763024054],[-475494.17168430414,7507079.858363787],[-475483.63745402906,7507073.017354657],[-475472.44585119816,7507067.314948194],[-475460.71949335403,7507062.813621156],[-475448.5868569272,7507059.562691024],[-475436.18086962117,7507057.597775667],[-475423.63745402906,7507056.940403111],[-475411.09403843695,7507057.597775667],[-475398.6880511309,7507059.562691024],[-475386.5554147041,7507062.813621156],[-475374.82905685995,7507067.314948194],[-475363.63745402906,7507073.017354657],[-475353.103223754,7507079.858363787],[-475343.341781266,7507087.763024054],[-475334.4600749718,7507096.644730348],[-475326.5554147041,7507106.406172836],[-475319.71440557495,7507116.940403111],[-475314.011999112,7507128.132005942],[-475309.51067207364,7507139.858363787],[-475306.259741941,7507151.991000213],[-475304.29482658487,7507164.396987519],[-475303.63745402906,7507176.940403111],[-475303.63745402906,7507176.940403111]]],"spatialReference":{"wkid":102100,"latestWkid":3857}}
geometryType: esriGeometryPolygon
inSR: 102100
outFields: UFRM_BLPU_POINT_ADDRESS
outSR: 102100 URL Encoded f=json&where=&returnGeometry=true&spatialRel=esriSpatialRelIntersects&geometry=%7B%22rings%22%3A%5B%5B%5B-475303.63745402906%2C7507176.940403111%5D%2C%5B-475304.29482658487%2C7507189.483818703%5D%2C%5B-475306.259741941%2C7507201.88980601%5D%2C%5B-475309.51067207364%2C7507214.022442436%5D%2C%5B-475314.011999112%2C7507225.7488002805%5D%2C%5B-475319.71440557495%2C7507236.940403111%5D%2C%5B-475326.5554147041%2C7507247.474633386%5D%2C%5B-475334.4600749718%2C7507257.236075874%5D%2C%5B-475343.341781266%2C7507266.117782169%5D%2C%5B-475353.103223754%2C7507274.022442436%5D%2C%5B-475363.63745402906%2C7507280.863451566%5D%2C%5B-475374.82905685995%2C7507286.565858029%5D%2C%5B-475386.5554147041%2C7507291.067185067%5D%2C%5B-475398.6880511309%2C7507294.318115199%5D%2C%5B-475411.09403843695%2C7507296.283030556%5D%2C%5B-475423.63745402906%2C7507296.940403111%5D%2C%5B-475436.18086962117%2C7507296.283030556%5D%2C%5B-475448.5868569272%2C7507294.318115199%5D%2C%5B-475460.71949335403%2C7507291.067185067%5D%2C%5B-475472.44585119816%2C7507286.565858029%5D%2C%5B-475483.63745402906%2C7507280.863451566%5D%2C%5B-475494.17168430414%2C7507274.022442436%5D%2C%5B-475503.93312679214%2C7507266.117782169%5D%2C%5B-475512.81483308633%2C7507257.236075874%5D%2C%5B-475520.71949335403%2C7507247.474633386%5D%2C%5B-475527.56050248316%2C7507236.940403111%5D%2C%5B-475533.26290894614%2C7507225.7488002805%5D%2C%5B-475537.7642359845%2C7507214.022442436%5D%2C%5B-475541.0151661171%2C7507201.88980601%5D%2C%5B-475542.98008147324%2C7507189.483818703%5D%2C%5B-475543.63745402906%2C7507176.940403111%5D%2C%5B-475542.98008147324%2C7507164.396987519%5D%2C%5B-475541.0151661171%2C7507151.991000213%5D%2C%5B-475537.7642359845%2C7507139.858363787%5D%2C%5B-475533.26290894614%2C7507128.132005942%5D%2C%5B-475527.56050248316%2C7507116.940403111%5D%2C%5B-475520.71949335403%2C7507106.406172836%5D%2C%5B-475512.81483308633%2C7507096.644730348%5D%2C%5B-475503.93312679214%2C7507087.763024054%5D%2C%5B-475494.17168430414%2C7507079.858363787%5D%2C%5B-475483.63745402906%2C7507073.017354657%5D%2C%5B-475472.44585119816%2C7507067.314948194%5D%2C%5B-475460.71949335403%2C7507062.813621156%5D%2C%5B-475448.5868569272%2C7507059.562691024%5D%2C%5B-475436.18086962117%2C7507057.597775667%5D%2C%5B-475423.63745402906%2C7507056.940403111%5D%2C%5B-475411.09403843695%2C7507057.597775667%5D%2C%5B-475398.6880511309%2C7507059.562691024%5D%2C%5B-475386.5554147041%2C7507062.813621156%5D%2C%5B-475374.82905685995%2C7507067.314948194%5D%2C%5B-475363.63745402906%2C7507073.017354657%5D%2C%5B-475353.103223754%2C7507079.858363787%5D%2C%5B-475343.341781266%2C7507087.763024054%5D%2C%5B-475334.4600749718%2C7507096.644730348%5D%2C%5B-475326.5554147041%2C7507106.406172836%5D%2C%5B-475319.71440557495%2C7507116.940403111%5D%2C%5B-475314.011999112%2C7507128.132005942%5D%2C%5B-475309.51067207364%2C7507139.858363787%5D%2C%5B-475306.259741941%2C7507151.991000213%5D%2C%5B-475304.29482658487%2C7507164.396987519%5D%2C%5B-475303.63745402906%2C7507176.940403111%5D%2C%5B-475303.63745402906%2C7507176.940403111%5D%5D%5D%2C%22spatialReference%22%3A%7B%22wkid%22%3A102100%2C%22latestWkid%22%3A3857%7D%7D&geometryType=esriGeometryPolygon&inSR=102100&outFields=UFRM_BLPU_POINT_ADDRESS&outSR=102100 I have tried taking the URL encoded string and pasting it into the url from my query builder, but this results in a 404. I have also tried copying just the encoded geometry but that also results in a 404. Why is the query builder going to a 404 page when i input geometry rings? Based on a user clicking the map, how do I take the x/y coordinates and create a circle that generates the rings above? thanks
... View more
12-17-2019
05:14 AM
|
0
|
4
|
1430
|
POST
|
Hi, i have created some code which does the following: 1) user clicks on the map (red pin) 2) a circle is created, based on the point in step 1, and queries the feature layer for items within the radius (50 meters (?)) 3) results are displayed on map (blue pins) var x = e.mapPoint.x;
var y = e.mapPoint.y;
var spatial = new SpatialReference({ wkid: 102100, latestWkid: 3857 });
var point = new Point(x, y, spatial);
qGeom = new Circle(point,{
"radius": 50,
"spatialReference":point.spatialReference
});
// use the circle for the query geometry
qParcels.geometry = qGeom;
qParcels.outFields = ["UFRM_BLPU_POINT_ADDRESS"];
qParcels.returnGeometry = true;
parcels = queryTask.execute(qParcels, showResults); Ok, so all of the above works perfectly client side using the jsapi 3.29. I now want to take the above functionality and replicate it in the Query Builder. I've used Chrome developer tools to try and mimic the request, but i don't have the full picture. Here is what i have so far. I'm getting an error when setting the Geometry to 'esriGeometryPolygon' 'geometry' parameter is invalid (I assume esriGeometryPolygon is what i should be using as that's what i located in dev tools). I'm also not sure how i set the circle. Can someone help me with the combination of settings? thanks
... View more
12-17-2019
04:40 AM
|
0
|
5
|
1612
|
POST
|
Hi, I have a map with multiple points, when i click on a point i get a pointInfoTemplate popup. I'm experimenting with adding my own hyperlink into this popup. So far, i've only been able to add the hyperlink into the title area which says 'click me'. I would like to add the hyperlink below the header, somewhere in the content pane, is that possible? If so, what could should i use? I've copied the snippet below. thanks for each (var item in apiData.items) { var x = item.geometry.x;
var y = item.geometry.y;
var point = new Point(x, y, spatial);
var pointAttributes = { Location: "item.attributes.LOCATION", Type: "item.attributes.BinType" };
var pointInfoTemplate = new InfoTemplate("item.attributes.LOCATION<br/><a class='clickMe' href='#' onclick='alert(item.geometry.x + \", \" + item.geometry.y);return false'>click me</a>");
var pointGraphic = new Graphic(point, pictureSymbol, pointAttributes, pointInfoTemplate);
map.graphics.add(pointGraphic);
}
... View more
12-02-2019
09:34 AM
|
0
|
2
|
651
|
POST
|
Hi Noah Sager, i'm using the code that was listed on the website example above. https://route.arcgis.com/arcgis/rest/services/World/Route/NAServer/Route_World/solve?<PARAMETERS> I''ve tested the full example for North America and it works ok, obviously adding in a real token at the end. https://route.arcgis.com/arcgis/rest/services/World/Route/NAServer/Route_World/solve? stops=%7B%22features%22:%5B%7B%22geometry%22:%7B%22x%22:-122.473948,%22y%22:37.7436%7D, %22attributes%22:%7B%22Name%22:%22Office%22, %22Attr_TravelTime%22:0%7D%7D,%7B%22geometry%22:%7B%22x%22:-122.439613,%22y%22:37.746144%7D, %22attributes%22:%7B%22Name%22:%22Store%201%22, %22Attr_TravelTime%22:25%7D%7D,%7B%22geometry%22:%7B%22x%22:-122.488254,%22y%22:37.754092%7D, %22attributes%22:%7B%22Name%22:%22Store%202%22, %22Attr_TravelTime%22:20%7D%7D,%7B%22geometry%22:%7B%22x%22:-122.44915,%22y%22:37.731837%7D, %22attributes%22:%7B%22Name%22:%22Store%203%22, %22Attr_TravelTime%22:30%7D%7D,%7B%22geometry%22:%7B%22x%22:-122.46441,%22y%22:37.774756%7D, %22attributes%22:%7B%22Name%22:%22Store%204%22, %22Attr_TravelTime%22:25%7D%7D,%7B%22geometry%22:%7B%22x%22:-122.426896,%22y%22:37.769352%7D, %22attributes%22:%7B%22Name%22:%22Store%205%22, %22Attr_TravelTime%22:20%7D%7D,%7B%22geometry%22:%7B%22x%22:-122.473948,%22y%22:37.7436%7D, %22attributes%22:%7B%22Name%22:%22Office%22,%22Attr_TravelTime%22:0%7D%7D%5D%7D&findBestSequence=true& preserverFirstStop=true&preserveLastStop=true&returnStops=true&returnDirections=true &returnRoutes=true&f=json&token=<yourToken> I have then taken the above example and added in my own Geometry, for UK points (again, with a real token at the end). https://route.arcgis.com/arcgis/rest/services/World/Route/NAServer/Route_World/solve?stops=%7B%22features%22:%5B%7B%22geometry%22:%7B%22x%22:-478874.691532653,%22y%22:7518246.362416124%7D,%22attributes%22:%7B%22Name%22:%22Council%20HQ%22,%22Attr_TravelTime%22:0%7D%7D,%7B%22geometry%22:%7B%22x%22:-488434.15778981743,%22y%22:7519078.501483244%7D,%22attributes%22:%7B%22Name%22:%22Barrhead%20Office%22,%22Attr_TravelTime%22:25%7D%7D%5D%7D&findBestSequence=true&preserverFirstStop=true&preserveLastStop=true&returnStops=true&returnDirections=true&returnRoutes=true&f=pjson&token=<yourToken> But i get the following error message: { "error": { "code": 400, "extendedCode": -2147200939, "message": "Unable to complete operation.", "details": [ "The input points are not within the data coverage area." ] } } So i assume that the Rest Service i'm pointing to only covers NA data, hence why i wondered if there is a Rest url i should be using for European data. Either that or my new input points are wrong? I'm projecting my eastling and northing data to 102100 Web Mercator. thanks
... View more
11-21-2019
01:45 AM
|
0
|
1
|
473
|
POST
|
Hi, i'm using the following Route Service example: Route service with synchronous execution—ArcGIS REST API: Directions and Routing Services | ArcGIS for Developers I've managed to get the example to work for US data pointing to this North America service: https://route.arcgis.com/arcgis/rest/services/World/Route/NAServer/Route_World/solve I'm now trying to use UK geometry, but obviously this is failing for North America data! The input points are not within the data coverage area. What is the corresponding url for the European Route Service so that i can perform a solve query? Also, i'm using a debLabs token to get to the NAServer, will this work for European data too, or do i need to generate a different token? thanks Scott
... View more
11-20-2019
08:44 AM
|
0
|
3
|
558
|
Online Status |
Offline
|
Date Last Visited |
11-11-2020
02:24 AM
|