ArcGIS Online won’t let me put Feature Layers below my Map Services in a web map. What am I doing wrong?

Matt Gaffner
4 min readOct 16, 2018

I may be the only ArcGIS Online user that wasn’t aware of this, but, in case there are others suffering in silence, I figured I should share this in case it helps just one person (makes me feel noble):

Problem: ArcGIS Online won’t let me put Feature Layers below my Map Services in a web map.

The second thing I learned in the GIS classes I took, immediately following Tobler’s Law, has also been permanently ingrained in my head: Points, Lines, then Polygons! It’s clear, then, why the map below bugs me.

Why can’t I move my “Tropical Current…” map service (points and lines) to be on top of my Median Home Value Feature Layer (polygons)?

Notice how the “Move up” and “Move down” options are grayed out. I can’t move the Tropical Current layer in my web map above any of the Median Home Value layers which all came from ESRI’s Living Atlas as Feature Layers. My Tropical Current layer is a map service that I added to my web map from WDT WeatherOp’s ArcGIS Server.

Turns out, I’ve been doing it wrong all along…well kind of.

I always add our data services to my web maps using the service level URL:
[YourArcGISServerName].com/arcgis/rest/services/[NameOfDirectory]/[NameOfService]/MapServer

When I’m only showing data services from our ArcGIS Server, I can order the data services as please to make pretty maps and ensure I’m displaying Points, Lines, then Polygons! However, when making maps with our map services and feature layers, I run into problems.

Solution: Add data to map using the layer level URL and NOT the service level URL.

If you add the map service endpoint to your map by using the layer level URL, then you can order your layers as you please. Each map service REST endpoint has at least one layer, and they are all numbered using iterating numbers starting at zero for convention’s sake:
[YourArcGISServerName].com/arcgis/rest/services/[NameOfDirectory]/[NameOfService]/MapServer/0

Parenthetical numbers indicate the layer ID. Appending the layer ID after the “…/MapServer/” will only display data from that layer of the map service.

To illustrate that it really does work, I chose the “Forecast Track (3)” layer and have added that URL to my web map:
[YourArcGISServerName].com/arcgis/rest/services/[NameOfDirectory]/[NameOfService]/MapServer/3

Notice the Forecast Track is now on top of the Median Home Value Feature Layer!

While this does give you more control to organize the order of the layers in your web map, it does make it more difficult to work with map services that have multiple layers especially if you’d prefer to toggle all of the layers in a map service on/off at the same time. Despite having to toggle more layers on/off individually, the ability to correctly order your Points, Lines, then Polygons! is well worth the additional clicks.

I’m sure there’s a great engineering/best practices reason that ArcGIS Online won’t requires the layer level URL to order the layers as you please; however, I cannot figure it out. I might have an ESRI insider who might have documentation as to why this is. If I get more information as to the ‘why?’, I’ll be sure to share by adding to this blog.

Nothing useful beyond this point, just some ramblings.

This was a problem that I have tried to figure out for as long as I’ve been using ArcGIS Online (at least 4 years I’d guess). This is probably a result of the way that I make web maps using mostly WDT WeatherOps GIS data services and don’t mashup data from multiple sources too often. I’ve been trying to create more meaningful maps that provide more insightful information and can be more of a solution than just a tool when this problem reared its head again today. It’s one of those things that I couldn’t figure out how to Google. I guess I couldn’t come up with good search terms. I’d tried reading ArcGIS Online and Feature Layer documentation, but nothing worked until I asked a friend if she knew how to fix the problem I was having. We all too often rely on the internet to find answers to our technical problems, but there is great value in talking to people, networking, and collaborating. You may solve a problem you’ve had for years. I may be the only one that’s had this problem, but maybe others have as well. Now to somehow make sure I tag this with useful key words…

--

--

Matt Gaffner

Weather Nerd. GIS Geek. Analyzing all things spatiotemporal. DTN Weather — matt.gaffner {@}dtn.com