Unable to select features from Cached services in ArcGIS Online

777
4
03-02-2012 06:47 AM
BradleyThomann
New Contributor
I have recently started caching several of my services meant to be added to ArcGIS Online due to the fact that labelling and symbology from .mxds are not retained when layers are added individually.  When I add these services to an ArcGIS Online map and enable the pop-up features, I am unable to select a feature by clicking directly on it.

Furthermore, if I click in open space, approximately 20 feet away from any feature to the southwest the pop-up for that feature is activated.  I've attached a .png showing this problem.  At first, I thought this might be a coordinate system issue.  However, if I bring the same layer in individually and uncached, it falls directly on top of the cached service, but I am able to activate the pop-up by clicking directly on the feature.  Very strange.

I'm wondering if perhaps I'm going about solving my labelling and symbology issues with ArcGIS Online the wrong way?  Does anyone have any advice for "best practices" regarding labelling or symbology?  Specifically, how to retain labels and symbology in ArcGIS Online without sacrificing pop-up capabilities?

Thanks,

Brad Thomann
GIS Specialist
Kapur & Associates, Inc.
Milwaukee, WI
Tags (2)
0 Kudos
4 Replies
MikeMinami
Esri Notable Contributor
Sounds like there are several different issues you are dealing with here. Let me see if I can explain a few things to you.

In general, you'll want to author your map services at the level of granularity you need. If you need to display one or more layers independently of another set of layers, then create separate map services for them.

You say:
I have recently started caching several of my services meant to be added to ArcGIS Online due to the fact that labelling and symbology from .mxds are not retained when layers are added individually.


I'm not sure exactly what you mean here because labeling and symbology are preserved. If you add a layer to your web map using this URL, labeling and symbology are preserved:

"http://gis1.kapur-assoc.com/ArcGIS/rest/services/Burlington/Burlington_Sanitary_Cache/MapServer"

If you add a layer based on this URL, where you are accessing an individual sublayer in the map service:

"http://gis1.kapur-assoc.com/ArcGIS/rest/services/Burlington/Burlington_Sanitary_Cache/MapServer/0"

yes, the labels and symbology are not preserved. The reason is because you are accessing the service in a different way. In the former case, when a request is sent to the map service to draw, the server generates an image and returns it to the client (web browser, mobile app). The image will be exactly how it's drawn in ArcMap, labels and all. In the latter case, where you add an individual sublayer, you are now sending a query request to the individual sublayer to return the actual geometry of the features. The server doesn't generate an image and instead streams the x,y coordinates to the client, and the client application draws them as graphics. This allows the client to control how the features are drawn. But that's why there are no labels.

Adding sublayers to a web map in this way does have some cost. You are now sending one request for each layer and having the server return the the raw coordinates. If you have a small number of features, it will probably perform ok. If you have a lot of features, all that data has to be transferred across the wire. Clients also have a limited ability to draw graphics. The more graphics you load onto the client, the slower it will perform. Also, ArcGIS Server will, by default, only allow queries of up to 1000 features, so if you have a lot of features, it won't really work.

Now let's talk about caching. I found your map and took a look at it.

http://www.arcgis.com/home/item.html?id=4d6ed38703bf4e068c3abd1d21594743

While you have created a cache for your map service, it's not getting used in this web map. The map is still getting rendered dynamically, where a request gets sent and the service returns an image. The reason the cache is not getting used is because the coordinate system is not Web Mercator. All of ArcGIS Online basemaps are in web mercator and if you want to display your cached tiles over it, it must also be in web mercator. You can, however, author a web map and make your data the basemap, then the cache will get used.

Now about the offset on the popup. That is strange. We'll need to look at that more closely to see what's going on.

Hope this helps,

Mike
0 Kudos
NishiChauhan-Patel
New Contributor
Hi

I am having the same issue with the pop-up as mentioned.

My mapservice is in OSGB36 and spatially displays correctly against the ESRI basemaps, but all pop-ups are offsetted to the south east by approx. 400ft.

unfortunately I am unable to share my ArcGIS Online map with you, as the data is confidential.

Any help would be great.

Thanks,
Nish
0 Kudos
MikeMinami
Esri Notable Contributor
Nish,

Can you take a screenshot of the Drawing Info section of a layer in your service so we can see how the service is configured?  It would be a page like this:

http://sampleserver3.arcgisonline.com/ArcGIS/rest/services/Earthquakes/EarthquakesFromLastSevenDays/...

Mike
0 Kudos
BradleyThomann
New Contributor
Mike,

Thanks, I think that answers alot of my questions.  I'll try converting my data to Web Mercator, and see if I can get it working better.

Brad Thomann
0 Kudos