1

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
define([
     'esri/dijit/Basemap',
           'esri/dijit/BasemapLayer',
           'esri/geometry/Point',
           'esri/units',
           'esri/geometry/Extent',
           'esri/config',
           'esri/tasks/GeometryService',
           'esri/layers/ImageParameters'
        ], 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: 'http://10.255.1.99/arcgis/rest/services/mymap/MapServer/'
            })]
        }),
        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

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.

0

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

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