POST
|
var searchWidget = new Search({ view: view, includeDefaultSources: false, sources: searchSources });
... View more
02-17-2019
02:51 AM
|
2
|
1
|
700
|
POST
|
I am using ArcGIS API for JavaScript 4.10 and I am adding point graphics to a map view using view.graphics.addMany() and passing in an array of graphics. However, when my map displays, the graphics aren't showing. Clicking on them shows that graphics are present, and that clicking hits them, they are just not visible. They only become visible after I use zoom in or out. This happens in both Chrome and Firefox browsers. Code that adds graphics: var caseGraphics = []; caseList.forEach(function(oneCase) { var point = { type: "point", longitude: oneCase.Location__Longitude__s, latitude: oneCase.Location__Latitude__s }; var pointGraphic = new Graphic({ geometry: point, symbol: createSymbol() // symbol is type: "picture-marker" // popupTemplate also present. removed for brevity }); caseGraphics.push(pointGraphic); }); view.graphics.addMany(caseGraphics); How can I fix this so that graphics always render correctly?
... View more
02-15-2019
08:54 AM
|
0
|
0
|
487
|
POST
|
I am using ArcGIS API for JavaScript 4.10 and I want to implement a dragging of map view that will have a location pin (point graphic) in the center of the view. I have handled "drag" event of the view and used lat/long coordinates in view.extent.center like this : view.on("drag", function(evt) { var locationGraphic = getCurrentLocationGraphics(); view.graphics.removeMany(locationGraphic); view.graphics.add(new Graphic(new Point([view.extent.center.longitude,view.extent.center.latitude]), selectedLocation)); }); However, I can't handle setting of these coordinates when the dragging of the view ends. I want to set some values and trigger functions when dragging stops. How can I accomplish this?
... View more
02-15-2019
08:42 AM
|
0
|
1
|
1583
|
POST
|
I am using ArcGIS API for JavaScript 4.10 for a map with a Search widget and I want to use it to match locations only from a private featureLayer. I have set this featureLayer in sources property of the Search widget and it appears and works, but there is also another search layer here called "ArcGIS World Grocoding". How can I remove/disable this default feature so that my Search widged works with only my data?
... View more
02-15-2019
08:35 AM
|
0
|
3
|
917
|
Title | Kudos | Posted |
---|---|---|
2 | 02-17-2019 02:51 AM |
Online Status |
Offline
|
Date Last Visited |
11-11-2020
02:23 AM
|