Error when using own Basemap

3482
5
03-10-2015 08:15 AM
TimWitt2
MVP Regular Contributor

Hey everybody,

When I use my own Basemap (wkid 2881) I get the following error when opening my app.

error2.png

When I switch to an ESRI basemap, I don't get an error.

Is this a bug?

Tim

0 Kudos
5 Replies
RebeccaStrauch__GISP
MVP Esteemed Contributor

TIm, if you are asking whether using your own Basemap with a different wkid than web Mercator aux is a bug....I would say no.  I use our basemaps with ​(AK Albers) with WAB and have had no issues.  I do have our Basemap service used to create the Basemap thru AGOL online, however, so I can use the maps mapID for WAB.   Then I use Robert Scheitlin, GISP​ 's eBasemap widget to add the rest of my basemaps services (also Ak Albers).  So, unless there is something specific about wkid 2881, I would check the typical missing or misplaced comma, or brackets.  Those can get spit out weird results, with or without an error message, in my experience anyway.

TimWitt2
MVP Regular Contributor

Thanks for the reply Rebecca.

So you use an ESRI basemap and then add your own basemap to the Basemap widget?

There shouldn't be any code error in my application, since when I use an AGOL basemap, I don't get an error.

0 Kudos
RebeccaStrauch__GISP
MVP Esteemed Contributor

No, I use my Basemap as the first Basemap, not an Esri version. The application will look at the first Basemap to determine the spatial reference it will us. So I created my own Basemap, using a service from our local ArcGIS Server, that was al​ready in Albers.   i set that as the Basemap, and don't add any other layers to that map (ie, not operational layer). Then in WAB I select that as my map to use.

I Don't think you can mix and match SRs in one spot, so if you set it to your custom wkid, you lose the ability to also access the esri basemaps.  That is, I do not think it can project on the fly (basemaps that is).  In Flex you could....I'm hoping that the JavaScript API will eventually, but even outside of WAB, I could not get that to work, but also haven't dug too much into it, since I'm a good hack, not a greater hacker.  

TimWitt2
MVP Regular Contributor

Thanks Rebecca, that makes sense.

So it seems having your basemap in the same SR as the ESRI basemaps would be a good practice?

0 Kudos
RebeccaStrauch__GISP
MVP Esteemed Contributor

i think the answer to that is "yes" if you want everything to work smoothly right out of the box, as designed, but that isn't always a solution.  We have reasons to use the basemaps we do, and though the esri basemaps would make life easier, I would rather do a little (or a lot, considering the size of  Alaska) then just use the default.  Web Mercator Auxiloary just doesn't do it for me. 

My opinion. ​

0 Kudos