-
-
Notifications
You must be signed in to change notification settings - Fork 278
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
Consume custom basemaps from agol organization account #151
Comments
@kcarrier, I won't say No because I'm not completely sure. ;) A few questions come to mind to explore this further: For the basemaps within your organization that you want to add, they AGOL Web Maps (not applications)? If they are web maps, where does the data for those maps reside? Are those web maps secured so only users within your organizational account can access them or are you sharing them publically? |
@kcarrier Hey, long time no her! Glad you're still in the game! Yes you can do this. The docs talk about setting a basemapsGroup key that points at your group that contains your basemaps: |
@DavidSpriggs Yes it has been a long time been working a lot in python but yes I am back. Been trying to work with AGOL templates none of which have the flexibility or functionality this template provides or offers. So in looking over the example I think I have it right but I am thinking I need to do something more in basemaps.js.maps. basemaps.js https://gist.github.com/kcarrier/2b6f5a64dc6fba78959c Would I need to do something to the basemaps.js.maps after this? @tmcgee - The data for the maps comes from our AMI. We were lacking some functionality like being able to zoom in beyond the Esri/WMAS threshold, Esri helped us in getting our basemaps setup in AGOL so the LODS go in beyond the normal levels. Therefore our basemaps go in 2 scales beyond the 1128 scale. Now I am just trying to consume them in the template. I think the code in basemaps.js is right but I am thinking I might need something else in basemaps.js.map, just not sure yet. Any advice would be greatly appreciated. |
@kcarrier You can disregard the .map files, they are called source maps and are used by developer tools to translate built code into something readable in dev tools. So this is all done automatically for you based off the source file, all you need to do is edit the source and then build. I made some comments on your gist. |
@DavidSpriggs - I have tried multiple ways of implementing this. I removed some of the references to the default AGO basemaps and tried implementing basemapGallery in this latest gist, still not sure what I am missing. I tried this on the developer site using a sandbox example but it is slightly different with some of the customization. Any thought on how to incorporate this into your template. My thought was if I included the basemapGallery function within the basemaps function and providing the function or return an alias I could use that in the basemapToShow arrary and then list the specific mapStartBasemap using the name of one of the basemaps in my gallery. Thoughts? https://gist.github.com/kcarrier/66a77ec217f974fbe47e FYI, this is the error I am receiving 0x800a138f - JavaScript runtime error: Unable to get property 'id' of undefined or null reference |
I think you will get the best results if you make a completely new basemap widget instead of using the existing one. Basically wrap the out of the box widget with a module that the template loads. I can put up a git for this latter tonight. |
@kcarrier did you find a solution? If so can you share a gist? Thx |
No I chose to go a different route, in my opinion AGOL handles basemaps differently than the ArcGIS API for JavaScript. In my opinion in JS it is much cleaner and smoother. Someone at Esri created the basemaps for me in AGOL with extra LODS defined but to the best of my knowledge you have to use a service with those extra LODS, they are currently unable to define the LODS in JSON when creating the custom basemaps. I also found flickering and choppy transitions when zooming in and out. This can be overcome in JS by setting |
Is there a way to configure basemaps.js to load available basemaps from an agol organizational account?
The text was updated successfully, but these errors were encountered: