POST
|
Have you looked at this: https://developers.arcgis.com/javascript/latest/secure-resources/
... View more
06-27-2023
09:31 PM
|
0
|
0
|
217
|
POST
|
Depending on what you are trying to achieve, you probably won't need the second part of the code to change the width on scale change if you just clone the first graphic and style the cloned graphic as you wish // clone existing graphic to create a copy
const clonedGraphic = existingPolylineGraphic.clone();
clonedGraphic.symbol = {
type: 'simple-line',
color: [255, 0, 0, 0.4],
width: 45, // you can make this a variable as well if needed
};
layer.add(clonedGraphic);
... View more
06-27-2023
09:06 PM
|
2
|
1
|
361
|
POST
|
Hi Vincent, I came across this issue as well. I wish the ESRI Dev team will add this as a property to the widget: "scaleBarOptions". My work around was to use interceptors in esriConfig and add the print service URL you are using for printing. here is the code snippet const addInterceptor = () => { // call this function before initializing the Print widget
esriConfig.request.interceptors.push({
urls: printServiceUrl, // the URL of the print service and make sure it is the same url as the one used in the Print widget
before: (params: any) => {
if (params.requestOptions.query.Web_Map_as_JSON) {
const jsonRequest = JSON.parse(params.requestOptions.query.Web_Map_as_JSON);
jsonRequest.layoutOptions.scaleBarOptions = {
metricLabel: 'm',
metricUnit: 'esriMeters',
nonMetricLabel: 'ft',
nonMetricUnit: 'esriFeet',
};
params.requestOptions.query.Web_Map_as_JSON = JSON.stringify(jsonRequest);
}
},
});
};
... View more
12-21-2022
05:05 PM
|
0
|
1
|
353
|
POST
|
The api is now at version 4.22 but npm i esri-loader is still installing 4.21 any thoughts?
... View more
12-29-2021
04:32 AM
|
0
|
1
|
533
|
POST
|
Hi Valgenmap, this should be a question to the ArcGIS API for JavaScript Community https://community.esri.com/t5/arcgis-api-for-javascript/ct-p/arcgis-api-for-javascript But you can achieve this by using esri-loader module import { loadModules } from 'esri-loader';
const initMap = () => {
loadModules([
"esri/Map",
"esri/views/MapView"
])
.then(([Map, MapView]) => {
const map = new Map({
basemap: 'streets-night-vector',
});
const view = new MapView({
container: "viewDiv",
map,
center: [-82.515401, 40.771119],
zoom: 10,
});
})
}
... View more
12-17-2021
10:05 AM
|
0
|
0
|
2017
|
IDEA
|
Would be nice to have the Legend similar to Legend in Desktop apps (ArcGIS Pro, ArcMap) as a widget in ArcGIS API for JavaScript.
... View more
12-17-2021
09:37 AM
|
3
|
3
|
1240
|
IDEA
|
I definitely agree, this is a great idea! hopefully it will be part of the next release. I have had more requests on this from clients where I have to build an extension. would be nice to have this already built-in similar to table filter in ArcGIS Online
... View more
12-17-2021
09:21 AM
|
0
|
0
|
922
|
POST
|
Hi Curtis, take a look at this: https://codepen.io/gavinr/details/qLNqVq
... View more
12-17-2021
09:13 AM
|
0
|
1
|
356
|
POST
|
have you tried this sample https://developers.arcgis.com/javascript/latest/sample-code/sandbox/?sample=featureeffect-geometry
... View more
12-17-2021
08:58 AM
|
1
|
1
|
1690
|
POST
|
Hi Barty, could you please share your code so we can better understand what you are trying to achieve?
... View more
12-17-2021
08:45 AM
|
0
|
3
|
1693
|
POST
|
Thank you Rene, I am using React but this did the trick. I really appreciated
... View more
12-13-2021
08:25 AM
|
0
|
0
|
1664
|
POST
|
The API provides two different css files for light and dark theme. I am trying to figure out a better way of switching theme on toggle button click. I've tried unloading the light css file then load the dark css file and I am not impressed with this approach. Does anybody out there ever tried this? Thank you
... View more
12-10-2021
07:50 AM
|
0
|
4
|
1724
|
POST
|
var map; require([ 'esri/basemaps', 'esri/map', 'esri/layers/WebTiledLayer', 'esri/dijit/BasemapLayer', 'esri/dijit/Basemap', 'esri/layers/ArcGISTiledMapServiceLayer', 'dojo/dom', 'dojo/domReady!', ], function ( esriBasemaps, Map, WebTiledLayer, BasemapLayer, Basemap, ArcGISTiledMapServiceLayer, dom ) { var nearmapTiledLayer = new WebTiledLayer( 'https://api.nearmap.com/tiles/v3/Vert/{z}/{x}/{y}.jpg?apikey=MY_NEARMAP_API_KEY', { copyright: 'Nearmap', id: 'nearmap', } ); var nearmapBasemapLayer = new BasemapLayer({ type: 'WebTiledLayer', url: 'https://api.nearmap.com/tiles/v3/Vert/{z}/{x}/{y}.jpg?apikey=MY_NEARMAP_API_KEY', copyright: 'Nearmap', id: 'nearmap', //subDomains: ['0', '1', '2', '3'], }); var nearmapBasemap = new Basemap({ id: 'nearmap', layers: [nearmapBasemapLayer], title: 'Nearmap', }); esriBasemaps.nearmap = { baseMapLayers: [nearmapBasemap], thumbnailUrl: '', title: 'Nearmap', }; map = new Map('mapDiv', { center: [-83.070543, 39.86905], basemap: 'nearmap', zoom: 14, }); //map.addLayer(nearmapTiledLayer); });
... View more
05-03-2021
08:56 AM
|
0
|
0
|
659
|
POST
|
I am using the API version 3.36 and trying to use the WebTiledLayer as basemap. what I have tried so far: 1. Adding Nearmap WebTiledLayer directly works var nearmapTiledLayer = new WebTiledLayer( 'https://api.nearmap.com/tiles/v3/Vert/{z}/{x}/{y}.jpg?apikey=MY_NEARMAP_API_KEY', { copyright: 'Nearmap', id: 'nearmap', } ); map.addLayer(nearmapTiledLayer); 2. Setting WebTiledLayer as basemap: Fails esriBasemaps.nearmap = { baseMapLayers: [nearmapTiledLayer], thumbnailUrl: '', title: 'Nearmap', }; this throws 400 error code 3. I have also tried the following: var nearmapTileLayer = new BasemapLayer({ type: 'WebTiledLayer', url: 'https://api.nearmap.com/tiles/v3/Vert/{z}/{x}/{y}.jpg?apikey=MY_NEARMAP_API_KEY', copyright: 'Nearmap', id: 'nearmap' }); var nearmapBasemap = new Basemap({ id: 'nearmap', layers: [nearmapTileLayer], title: 'Nearmap', }); esriBasemaps.nearmap = { baseMapLayers: [nearmapBasemap], title: 'Nearmap', }; And this throws the following error: Any suggestions?
... View more
05-03-2021
08:47 AM
|
1
|
1
|
665
|
Title | Kudos | Posted |
---|---|---|
2 | 06-27-2023 09:06 PM | |
1 | 12-17-2021 08:58 AM | |
3 | 12-17-2021 09:37 AM | |
1 | 05-03-2021 08:47 AM | |
1 | 09-01-2016 08:36 AM |
Online Status |
Offline
|
Date Last Visited |
06-28-2023
06:10 AM
|