POST
|
The formatting only breaks when the field is added to the href attribute, if I add it to the class attribute it works fine.
... View more
07-16-2019
07:02 AM
|
0
|
0
|
696
|
POST
|
Why does the first reference to myFieldName in the content work fine, outputting "431467" but the second reference in the href of the link output as "431,467", which breaks the link? On version 4.12. popupTemplate:{
title: "My Popup",
content:"{myFieldName} <a href='https://mysite.co.uk/PDFs/{myFieldName}.pdf'>View Order</a>",
fieldInfos:[
{
fieldName: "myFieldName",
format: {
places:0,
digitSeparator: false
}
}
]
}
... View more
07-16-2019
03:40 AM
|
0
|
2
|
828
|
POST
|
I've realised this behaviour is not limited to the directions widget. It's across all my maps, adding graphics anywhere do not load onto the view, even though they exist in view.graphics or myGraphicsLayer.graphics. This is happening across my PC only on all browsers but not on my phone, it works fine on my phone. It is also for v4.12 only, v4.11 works fine. Strange that it is across all browsers, on my PC only, so the problem must be something on my PC. Any ideas?
... View more
07-12-2019
02:30 AM
|
0
|
1
|
977
|
POST
|
Ah of course. Turns out I was adding geometrys to the routeparams instead of graphics.
... View more
07-12-2019
12:54 AM
|
0
|
0
|
772
|
POST
|
I'm writing a custom directions widget because the default one doesn't have the functionality I need. Loading in the from point and the to point work fine. But on Line 60 my call to routeTask.solve() doesn't do anything? It doesn't even make a network request, which I've monitored through Chrome dev tools. Any ideas on what's going wrong? I've used routeTask.solve() successfully before. The only difference between the successful times and this, that I can see, is that this on a different file and is imported through dojo require. function CustomDirections(options){
var fromLoc = null;
var toLoc = null;
var view = options.view;
var routeLayer = options.routeLayer;
var routeTask = options.routeTask;
var routeParams = options.routeParams;
var routeSymbol = options.routeSymbol;
var search = options.search;
search.autoSelect = false;
var directionsNode = document.createElement("div");
directionsNode.className = "custom-directions";
var searchNode = document.createElement("div");
search.container = searchNode;
directionsNode.appendChild(searchNode);
var toLocation = document.createElement("p");
toLocation.innerHTML = "Test";
directionsNode.appendChild(toLocation);
var routeWrapper = document.createElement("div");
directionsNode.appendChild(routeWrapper);
search.on("search-complete", function(event){
setFromLocation(event);
event.stopPropagation();
});
search.on("select-result", function(event){
setFromLocation(event);
event.stopPropagation();
});
function setFromLocation(event){
console.log("setFromLocation => ", event.results[0].results[0].feature.geometry);
fromLoc = event.results[0].results[0].feature.geometry;
if(fromLoc !== null && toLoc !== null){
renderRoute();
}
}
function setToLocation(loc){
console.log("setToLocation => ", loc);
toLoc = loc;
toLocation.innerHTML = loc.x.toFixed(0) + ", " + loc.y.toFixed(0);
if(fromLoc !== null && toLoc !== null){
renderRoute();
}
}
function renderRoute(){
routeLayer.removeAll();
routeParams.stops.features = [];
routeParams.stops.features.push(fromLoc);
routeParams.stops.features.push(toLoc);
routeTask.solve(routeParams).then(function(data){
console.log(data);
});
}
return {
domNode: directionsNode,
setToLocation: setToLocation
};
}
... View more
07-11-2019
08:56 AM
|
0
|
2
|
836
|
POST
|
Very odd. I've tried it on Chrome, FF and IE11 and none of them work, with that Javascript sanbox link and with files on my server. The route is generated successfully in the widget, but nothing is rendered on the view.
... View more
07-11-2019
08:04 AM
|
0
|
0
|
977
|
POST
|
The directions widget's symbols are not added to the map as of 4.12. It still works in 4.11. See: https://developers.arcgis.com/javascript/latest/sample-code/sandbox/index.html?sample=widgets-directions Change the imports from 4.12 to 4.11 and it will start working.
... View more
07-11-2019
01:46 AM
|
0
|
5
|
1220
|
POST
|
I've been following this guide to deploy a custom build of the JS API. I've got it working, but I don't really understand what is happening. The guide says the config.ts file configures the application to use the workers of the ArcGIS API for JavaScript from the cdn. Can I not locally host these files and serve them myself?
... View more
06-06-2019
01:42 AM
|
0
|
1
|
510
|
POST
|
I've been using ES6 and need to transpile it down for IE11 support. My environment doesn't have node, which has lead me to babel-standalone. I can't seem to get it to work though. Does anyone have the ArcGIS JS API working with it?
... View more
05-13-2019
07:57 AM
|
0
|
0
|
563
|
POST
|
Thanks for the reply Robert. Tried that, but as mentioned in the forum you linked, it semi breaks the widget. I'll build my own widget then.
... View more
04-30-2019
06:37 AM
|
0
|
0
|
486
|
POST
|
Is there anyway to push 2 locations to a Directions widget without using it's interface? I've looked in Directions.viewModel but haven't had any success.
... View more
04-30-2019
03:46 AM
|
0
|
2
|
562
|
POST
|
Solved by using the .copy function of Point var stopGeometry = new Point();
stopGeometry.copy(otherGeometry);
stopGeometry.x = e.x;
stopGeometry.y = e.y;
... View more
12-07-2018
03:29 AM
|
0
|
1
|
1096
|
POST
|
var stopGeometry = new Point({
x:e.x,
y:e.y
}); My map is of wkid 27700. I'm using RouteTasks and have a point of wkid 27700 I need the directions from. I have an x and y target value so I'm making a new Point like above. The problem is this Point has a wkid of 4326. How can I change this to 27700? I tried stopGeometry.spatialReference.wkid = 27700; but that doesn't work. The API reference for Point doesn't mention being able to change the spatial reference wkid.
... View more
12-07-2018
02:22 AM
|
0
|
2
|
1249
|
POST
|
Hi Daniel, Please see this link: https://@ma@psat.t@mb@c.go@v.uk/ma@ps/ca@llf@ors@ites/ with the @ symbols removed. I've just tested it now and the issue persists. This was on Safari on an iPhone 6s+ running iOS 12.0. I've just tried Chrome on the same system and the issue is also occurring there.
... View more
12-05-2018
02:16 AM
|
0
|
1
|
743
|
POST
|
Hi Robert, I'd like suggestions to be enabled but to use the "findAddressCandidates" method instead of the "suggest" method as "suggest" returns "Endpoint not found." Is this possible?
... View more
12-03-2018
06:17 AM
|
0
|
1
|
819
|
Title | Kudos | Posted |
---|---|---|
1 | 11-05-2018 09:05 AM | |
1 | 11-07-2018 07:16 AM | |
1 | 11-07-2018 01:37 AM | |
1 | 10-05-2018 01:38 AM | |
3 | 11-07-2018 07:36 AM |
Online Status |
Offline
|
Date Last Visited |
11-11-2020
02:24 AM
|