Select to view content in your preferred language

Basemap own and esri can be posted together?

1328
8
Jump to solution
02-06-2012 12:56 PM
LefterisKoumis
Frequent Contributor
I created my own basemap and I am trying to use in the app along with two of the esri basemap

As it is shown in the code, the District 1 will show, but not the esri basemaps if the user click on the map switcher.
If I comment out the District 1 layer, then both ESRI basemaps will be displayed if selected.
In ArcMAp all the basemaps can be shown together with no problems.
How can I use my and esri basemap in the same app? Thank you.

Here is the code for basemaps:

<basemaps>
<layer label="District 1"  type="dynamic" visible="true"
                   url="http://10.168.28.59/DEA_ArcGIS/rest/services/basemaps/District1/MapServer"/>
            <layer label="Aerial"  type="tiled" visible="false"
                   url="http://server.arcgisonline.com/ArcGIS/rest/services/World_Imagery/MapServer"/>
             <layer label="Topo"    type="tiled" visible="false"
                   url="http://server.arcgisonline.com/ArcGIS/rest/services/World_Topo_Map/MapServer"/>
        </basemaps>
Tags (2)
0 Kudos
1 Solution

Accepted Solutions
RobertScheitlin__GISP
MVP Emeritus
Lefteris,

   Jan is on the right track but you do not have to make it a tiled layer to use it as a basemap or =have it work with the other esri basemaps. Your issue is that you have it as the first basemap in your list and there for is the layer that defines the maps LODs and spatial reference. If you more it to the last layer listed than it should work fine as then the first basemap will be a tiled layer and the map will get the LODs from that layer.

Don't forget to click the Mark as answer check and to click the top arrow (promote) as shown below:

View solution in original post

0 Kudos
8 Replies
BjornSvensson
Esri Regular Contributor
What's the projection of your basemap?

If it is using Web Mercator like the ArcGIS Onlines ones?  If so, it should work.
0 Kudos
RobertScheitlin__GISP
MVP Emeritus
Lefteris,

   Are you saying that you want District 1 to display on top of one or the other of the basemaps you have listed? Or are you saying that you want District 1 to act like a basemap and have a button in the map switcher?
0 Kudos
LefterisKoumis
Frequent Contributor
Lefteris,

   Are you saying that you want District 1 to display on top of one or the other of the basemaps you have listed? Or are you saying that you want District 1 to act like a basemap and have a button in the map switcher?


Thank you responding. The second scenario is what I am trying to accomplish. The district 1 layer is on Web Mercator projection as well.
0 Kudos
LefterisKoumis
Frequent Contributor
What's the projection of your basemap?

If it is using Web Mercator like the ArcGIS Onlines ones?  If so, it should work.


The district 1 layer is on Web Mercator projection as well. Thank you.
0 Kudos
LefterisKoumis
Frequent Contributor
The district 1 layer is on Web Mercator projection as well. Thank you.



Attached is a video that shows that the basemap that I am trying to use is on Web Mercator as well. Also it shows that I can view my basemap but if I click on the map switcher to view the esri basemap I cannot. However, if I comment out my basemap, the esri basemap are displayed!!!


" rel="nofollow" target="_blank">http://www.youtube.com/watch?v=zK3E6IVN8C4[/video]
0 Kudos
J_B__K_
Deactivated User

Here is the code for basemaps:

<basemaps>
<layer label="District 1"  type="dynamic" visible="true"
                   url="http://10.168.28.59/DEA_ArcGIS/rest/services/basemaps/District1/MapServer"/>
            <layer label="Aerial"  type="tiled" visible="false"
                   url="http://server.arcgisonline.com/ArcGIS/rest/services/World_Imagery/MapServer"/>
             <layer label="Topo"    type="tiled" visible="false"
                   url="http://server.arcgisonline.com/ArcGIS/rest/services/World_Topo_Map/MapServer"/>
        </basemaps>


It seems to me that you've missed this... your basemap is dynamic - that means it has no LODs, right? So the viewer don't know what LODs to use and it won't show anything... make it tiled (remember to create appropriate cache if you haven't already done it) and it should work...
0 Kudos
RobertScheitlin__GISP
MVP Emeritus
Lefteris,

   Jan is on the right track but you do not have to make it a tiled layer to use it as a basemap or =have it work with the other esri basemaps. Your issue is that you have it as the first basemap in your list and there for is the layer that defines the maps LODs and spatial reference. If you more it to the last layer listed than it should work fine as then the first basemap will be a tiled layer and the map will get the LODs from that layer.

Don't forget to click the Mark as answer check and to click the top arrow (promote) as shown below:
0 Kudos
LefterisKoumis
Frequent Contributor
Lefteris,

   Jan is on the right track but you do not have to make it a tiled layer to use it as a basemap or =have it work with the other esri basemaps. Your issue is that you have it as the first basemap in your list and there for is the layer that defines the maps LODs and spatial reference. If you more it to the last layer listed than it should work fine as then the first basemap will be a tiled layer and the map will get the LODs from that layer.

Don't forget to click the Mark as answer check and to click the top arrow (promote) as shown below:


That was it! Thank you all for your help!!
0 Kudos