Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Errors loading custom basemaps when integrating a WAB widget #15

Closed
JhopStl opened this issue Apr 13, 2017 · 6 comments
Closed

Errors loading custom basemaps when integrating a WAB widget #15

JhopStl opened this issue Apr 13, 2017 · 6 comments

Comments

@JhopStl
Copy link

JhopStl commented Apr 13, 2017

When adding the WAB widgets and their dependencies (_WABMixin in the controller), I get the following errors upon loading a custom basemap:

Basemap.js:4 esri.dijit.Basemap: unable to find the 'layers' property in parameters
BasemapLayer.js:4 esri.dijit.BasemapLayer: unable to find the 'url' or 'type' property in parameters

I was not able to replicate this issue when loading AGOL basemaps. Also, it's worth noting that the basemap will not load at all in IE when using the same custom basemaps (still loads fine in Chrome, Firefox and Edge). The errors are generated after basemap creation takes place in the config (i.e. wab-measure.js) file.

Any ideas on what could be causing the issue?
I've made the test site public: http:https://map.sccmo.org/Main/cmv_wab/demo.html but I can attach code if needed.

Besides that, the WAB widgets are working great CMV!

Thanks,

Jesse

@JhopStl
Copy link
Author

JhopStl commented Apr 17, 2017

Note: Reverting back to WAB versions 2.3 or 2.2 allows IE to load the basemap properly, however the aforementioned errors still persist.

@tmcgee
Copy link
Member

tmcgee commented Apr 19, 2017

@JhopStl i am using custom basemaps anf WAB version 2.4 without issue. Not sure what the issue is here. I'll try to debug your public app when at a desktop. Thanks for providing that.

@JhopStl
Copy link
Author

JhopStl commented Apr 20, 2017

@tmcgee I appreciate it. With that, I've probably just configured something incorrectly...I spent quite awhile looking at it, and I plan on spending even more time when I'm free.

@tmcgee
Copy link
Member

tmcgee commented Apr 23, 2017

@JhopStl Since you are using ESRI Map Services, did you try using basemap and baseMapLayers instead of layers? Here's an example for one of your custom basemaps:

aerial2015: {
    title: '2015 Aerial',
    basemap: {
        baseMapLayers: [
            {
                url: 'http:https://10.10.143.115/scc_gis/rest/services/appservices/JS_ortho2015/MapServer'             
	    }
        ]			
    }
},

NOTE: I cannot test using the public application you provided since the i.p. address 10.10.143.115 is not accessible outside your network. I did test using these basemaps in the cmv demo.

@JhopStl
Copy link
Author

JhopStl commented May 2, 2017

@tmcgee Here is the working public URL: http:https://map.sccmo.org/Main/gis_dev/
I tried your suggestion, and it worked.

Viewer.js
1

Thanks!

@JhopStl JhopStl closed this as completed May 2, 2017
@cmccullough2
Copy link

Can you use Google Terrain as the main basemap?
googleTerrain: {
title: 'Google Terrain',
basemap: new Basemap({
id: 'googleTerrain',
layers: [new BasemapLayer({
url: "https://mt${subDomain}.google.com/vt/lyrs=t,r&hl=en&gl=en&x=${col}&y=${row}&z=${level}&s=png",
copyright: "Google, 2015",
id: "googleTerrain",
subDomains: ["0", "1", "2", "3"],
type:"WebTiledLayer"
})
]
})
}

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants