|
POST
|
Hi Andrew, have you tried this to log an event? var trackOn = track.on("track", function(event) {
console.log(event);
}); Also make sure you're on a site using https or using localhost. The following was working for me.. <!DOCTYPE html>
<html>
<head>
<meta charset="utf-8" />
<meta
name="viewport"
content="initial-scale=1,maximum-scale=1,user-scalable=no"
/>
<title>Track current location - 4.10</title>
<style>
html,
body,
#viewDiv {
padding: 0;
margin: 0;
height: 100%;
width: 100%;
}
</style>
<link
rel="stylesheet"
href="https://js.arcgis.com/4.10/esri/css/main.css"
/>
<script src="https://js.arcgis.com/4.10/"></script>
<script>
require([
"esri/widgets/Track",
"esri/views/MapView",
"esri/Map"
], function(Track, MapView, Map) {
var map = new Map({
basemap: "topo"
});
var view = new MapView({
map: map,
container: "viewDiv"
});
// Create an instance of the Track widget
// and add it to the view's UI
track = new Track({
view: view
});
view.ui.add(track, "top-left");
var trackOn = track.on("track", function(event) {
console.log(event);
});
});
</script>
</head>
<body>
<div id="viewDiv"></div>
</body>
</html>
... View more
01-15-2019
02:21 PM
|
2
|
6
|
3241
|
|
POST
|
Hey Mikk, can you make sure that the resultSymbol is an instance of a symbol and not an object? What symbol type is it?
... View more
01-14-2019
09:02 AM
|
1
|
1
|
1783
|
|
POST
|
Hi Daniel, Thanks for bringing this to our attention. This is a bug with the Search widget sharing the same sources. In order to fix this, can you add the following line after you create your search widgets? searchWidget.viewModel._set("allSources", searchWidget.viewModel.allSources.clone()); This will make a clone of the `allSources` collection which will allow you to modify it without affecting the other search widget. Feel free to add this one liner to the other widget as well. We'll get this fixed for 4.11. Thanks!
... View more
01-03-2019
03:14 PM
|
0
|
5
|
1783
|
|
POST
|
Hey Davide Limosani, there actually is a bug here but the workaround Undral Batsukh provided is a good one! thanks for letting us know about the issue. -Matt
... View more
12-11-2018
11:00 AM
|
2
|
0
|
795
|
|
POST
|
Hey Douglas, It seems part of the map view is outside of the page. You can tell because the whole map should have a focus outline when focussed. When the popup is closed, the map view goes back into focus which brings the page down. In order to fix this, you'll have to set overflow hidden on a div so that it won't be able to scroll or bring the view up so that it is fully visible and won't scroll down. I would suggest positioning the header absolutely and having over the map with some view padding. -Matt
... View more
10-31-2018
10:25 AM
|
1
|
1
|
2118
|
|
POST
|
Hey Richard, Modifying the widget after initial rendering is used by @renderable properties and calling `scheduleRender()` on the widget. Since it is JSX, it renders just the things that need to or have been changed. The 4x widgets don't use DOM nodes, they use Virtual DOM nodes but you can get an attachment of the node by setting functions to the "afterUpdate" and "afterCreate" properties on the VDOM. I would recommend doing some research on JSX and going through some tutorials or video screencasts. Hopefully it will click! Here is the widget dev documentation: Widget development | ArcGIS API for JavaScript 4.9 -Matt
... View more
10-11-2018
02:48 PM
|
1
|
1
|
1077
|
|
POST
|
Hey Phil, can you try this as a workaround for now? const searchWidget = new Search({
view: view,
includeDefaultSources: false
});
const sources = [
{
locator: new Locator({
url:
"https://gis.spokanecounty.org/arcgis/rest/services/Locators/AddrComposite/GeocodeServer"
}),
name: "addrComposite",
placeholder: "Search Addresses"
}
];
type SearchSource = __esri.LocatorSource | __esri.FeatureLayerSource;
searchWidget.sources.addMany(sources as SearchSource[]);
... View more
08-30-2018
11:27 AM
|
1
|
1
|
1736
|
|
POST
|
Hey Phil, I believe it is because it is expecting a collection of a certain type and can't autocast the collection properly. Can you try just pushing to the existing sources since it should be empty on initialize? import Locator = require("esri/tasks/Locator");
import Search = require("esri/widgets/Search");
var searchWidget = new Search({
view: view,
includeDefaultSources: false
});
searchWidget.sources.addMany([{
locator: new Locator({ url: "https://gis.spokanecounty.org/arcgis/rest/services/Locators/AddrComposite/GeocodeServer" }),
name: "addrComposite",
placeholder: "Search Addresses"
}]); I'll talk to some colleagues and see if we can fix this. -Matt
... View more
08-30-2018
10:15 AM
|
0
|
3
|
1736
|
|
POST
|
Hi Alec, The search widget requires features with a geometry so it's not designed to work with just a table. That 3rd flag is for whether result is a suggestion result or not. Since suggestions don't have geometries returned, they are valid without one and a graphic without a geometry is created. Does that help?
... View more
07-26-2018
02:36 PM
|
1
|
1
|
1051
|
|
POST
|
We've addressed the issue in 4.8. Thanks for letting us know!
... View more
06-21-2018
02:44 PM
|
2
|
3
|
4267
|
|
POST
|
Hey Davide, We're working to get this fixed for 4.8 which will be the next release. If you would like to use 4.7, here is a workaround for the issue: JS Bin - Collaborative JavaScript Debugging -Matt
... View more
06-20-2018
08:37 AM
|
1
|
0
|
4267
|
|
POST
|
Hey David, This does look like a bug. We'll look into it and report back what we find. Should be able to get this fixed for 4.8. Thanks for reporting!
... View more
06-19-2018
10:23 AM
|
1
|
2
|
4267
|
|
POST
|
Hi Justdoit011, Yes this looks to be a bug. I'll get an issue created. Are you able to work around it? At the very least have some kind of arcade expression that will show a "no image" image when there isn't a valid URL.
... View more
04-19-2018
04:41 PM
|
1
|
2
|
1258
|
|
POST
|
As of right now, not that I'm aware of. You could create a copy of the view and supply a custom one but that seems like overkill. There may be some way to intercept the URL but that seems like a bad idea as well.
... View more
04-12-2018
11:10 AM
|
1
|
1
|
937
|
| Title | Kudos | Posted |
|---|---|---|
| 1 | 10-14-2024 01:33 PM | |
| 1 | 12-01-2023 11:14 AM | |
| 1 | 06-23-2021 09:54 AM | |
| 1 | 04-12-2018 11:10 AM | |
| 1 | 04-09-2015 03:08 PM |
| Online Status |
Offline
|
| Date Last Visited |
08-21-2025
02:27 PM
|