I have a problem in configuring basemap in viewer.js. I want to use a completely offline basemap for my app. I have read the instruction here but can't make it work.

Here is what i have tried :

  1. Modifying the viewer.js in the define section
        ], function (Basemap, BasemapLayer, Point, units, Extent, 
         esriConfig, GeometryService, ImageParameters)
  1. Adding the custom basemap in viewer.js
mapOptions: {
       basemap: new Basemap({
            id: 'mymap',
            layers: [new BasemapLayer({
            url: ''
        center: new Point({  
            x: 90.0148634,
            y: -9.5489264,
            spatialReference: {
                wkid: 32750
        zoom: 5,
        sliderStyle: 'small',
        showAttribution: true

Nothing is displayed. How can I correct this ? Am i missing something ?

Note : i am using CMV ver 1.3.4, Chrome.

1 Answer 1


The X and Y coordinates of your center point look odd for the wkid 32750 that you used. Perhaps you used LAT/LNG instead of X/Y coordinates.

You can use the Esri Sample code here to test your mapOptions.

  • I fix the xy to the correct one. Still it gives me error. The error occurs in Controller.JS (line 207) : "if (this.config.mapOptions.basemap)". It says : Uncaught TypeError: Cannot read property 'basemap' of undefined. The js script api is hosted online.
    – padjee
    Jan 11, 2019 at 4:05

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.