You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
i want to set owner basemap from local server and not onlie basemap like osm or other online basemap.
this is my basemaps.js and viewer.js config.
when i set basemap to osm app is start normally but when i set basemap to my local basemap app not load.
thanks
viewer.js
define([
'esri/units',
'esri/layers/ImageParameters',
'dojo/topic'
], function (units, ImageParameters) {
// helper function returning ImageParameters for dynamic layers
// example:
// imageParameters: buildImageParameters({
// layerIds: [0],
// layerOption: 'show'
// })
function buildImageParameters (config) {
config = config || {};
var ip = new ImageParameters();
//image parameters for dynamic services, set to png32 for higher quality exports
ip.format = 'png32';
for (var key in config) {
if (config.hasOwnProperty(key)) {
ip[key] = config[key];
}
}
return ip;
}
return {
// used for debugging your app
isDebug: true,
//default mapClick mode, mapClickMode lets widgets know what mode the map is in to avoid multipult map click actions from taking place (ie identify while drawing).
defaultMapClickMode: 'identify',
// map options, passed to map constructor. see: https://developers.arcgis.com/javascript/jsapi/map-amd.html#map1
mapOptions: {
basemap: new Basemap({
id: 'basemap1',
layers: [new BasemapLayer({
url: 'http://localhost:6080/arcgis/rest/services/BaseMap/BaseMaps/MapServer'
})]
}),
center: [30.8, 38.7],
zoom: 12,
sliderStyle: 'small'
},
return {
map: true, // needs a reference to the map
mode: 'custom', // mut be either 'agol' or 'custom'
/* optional starting basemap
/ otherwise uses the basemap from the map
/ must match one of the keys in basemaps object below
*/
mapStartBasemap: 'BaseMap1',
/* optional array of basemaps to show in menu.
/ otherwise uses keys in basemaps object below
/ values in array must match keys in basemaps object
*/
basemapsToShow: ['osm','BaseMap1'],
// define all valid basemaps here.
basemaps: {
osm: {},
BaseMap1: {
title: 'arial',
basemap: new Basemap({
id: 'basemap1',
layers: [new BasemapLayer({
url: 'http://localhost:6080/arcgis/rest/services/BaseMap/BaseMaps/MapServer'
})]
})
}
}
};
});
The text was updated successfully, but these errors were encountered:
@abbasbeigy For questions about CMV configuration, please open an issue in the main cmv-app repo. This repo is specific to using CMV with Esri's Calcite Maps.
HI Dear
I have a problem with set custom basemap.
i want to set owner basemap from local server and not onlie basemap like osm or other online basemap.
this is my basemaps.js and viewer.js config.
when i set basemap to osm app is start normally but when i set basemap to my local basemap app not load.
thanks
viewer.js
define([
'esri/units',
'esri/layers/ImageParameters',
'dojo/topic'
], function (units, ImageParameters) {
basemaps.js
define([
'esri/dijit/Basemap',
'esri/dijit/BasemapLayer',
'dojo/i18n!./nls/main'
], function (Basemap, BasemapLayer, i18n) {
});
The text was updated successfully, but these errors were encountered: