Hi,
I'm facing a weird issue wich was already existing in js api 3.x : When the app start, the map loads and the inner canvas heigth start to increase non stop (see attachment). Looks like I'm animating an elevator ...
In js api 3.x, @RobErt Scheitlin solves the problem suggesting to set "autoResize" property to false.
In js api 4.x, I don't see any equivalent property. It's the first time I encounter such a problem, dunno how to solve this issue
Here is the code :
In HTML file :
<div id="mapMatriCAD"></div>
In JS file :
// Create a Map instance
const matricadMap = new Map({
basemap: colorBasemap
});
// Create a MapView instance (for 2D viewing) and reference the map instance
const matricadMapView = new MapView({
container: "mapMatriCAD",
map: matricadMap,
highlightOptions: {
color: "orange"
}
});
// Toggle backgrounds layers
const basemapToggle = new BasemapToggle({
view: matricadMapView,
nextBasemap: aerophotoBasemap
});
ready(function () {
/* Set ArcGIS Server proxy URL */
esriConfig.request.proxyUrl = proxyiedUrl;
/* Set ArcGIS GeometryService URL */
esriConfig.geometryServiceUrl = 'https://<my-geometry-service>';
// Set map extent
const matricadMapExtent = new Extent({
xmin: 145998.0719999969,
ymin: 162020.52899999917,
xmax: 152430.14699999988,
ymax: 167383.29899999872,
spatialReference: {
wkid: 31370
}
});
matricadMapView.extent = matricadMapExtent;
// Set initial zoom
matricadMapView.constraints = {
minScale: 25000
};
// Get graphic properties from view click
matricadMapView.on('click', function (event) {
matricadMapView.hitTest(event).then(function (response) {
if (response.results.length) {
debugger;
}
});
});
});