Rendering Labels in AGSDynamicMapServiceLayer

3822
4
05-11-2010 06:01 AM
by Anonymous User
Not applicable
Original User: jdb1a1

The labels in my AGSDynamicMapServiceLayer render labels too big.  See the attached screenshots.  One is from the beta of our iPhone app, the other is the javascript client in the ArcGIS REST directory.  The one in the REST directory looks good, the one on the iPhone looks too "bulky."  I don't want to have multiple map services for web clients and mobile clients if I can help it.  Is there a way around this?

Thanks,
Jeremy Bixby
City of Lenexa, KS
0 Kudos
4 Replies
DiveshGoyal
Esri Regular Contributor
Are the labels really "labels" in your map document, or are they annotations?

Also, can you zoom in closer on the browser map to see how the symbols scale? The map's scale, dimensions, and aspect ratio on the phone are quite different from the browser (looking at your screenshots). Maybe that's why your'e seeing the difference.

Is your service acessible? Can I hit it?

_
Divesh
0 Kudos
by Anonymous User
Not applicable
Original User: jdb1a1

Divesh,

Those are most definitely labels and not annotation.  I did that map service specifically as an iphone sdk test service.

Be my guest.  The URL for the TIF layer (the green polygon layer that I was showing in the previous thread), is:

http://ch-arcims.ci.lenexa.ks.us/ArcGIS/rest/services/GeneralServices/TIF_DISTRICTS/MapServer

Here are a few other screenshots below.  One shows a tiled map service (subdivisions) and the other shows a dynamic map service (zoning).  On our web clients, the labels on both types of map services are rendered basically the same.  On the iPhone SDK, the tiled map service (subdivisions, that is) looks like we would want it to look; the dynamic map service has those big, blown up labels.

The zoning layer can be accessed at:
http://ch-arcims.ci.lenexa.ks.us/ArcGIS/rest/services/GeneralServices/Zoning2/MapServer

The subdivisions layer can be accessed at:
http://ch-arcims.ci.lenexa.ks.us/ArcGIS/rest/services/LenexaSubdivisionsService1/MapServer

Thanks,
Jeremy

PS-  i really like the new support forums.  I especially like the "All the best" decorum in the reply emails that your system generates.:cool:
0 Kudos
DiveshGoyal
Esri Regular Contributor
The labels are bigger because AGSDynamicMapServiceLayer uses the phone's resolution (163 DPI) to export maps.  Other APIs that run on computers (not phones) use a smaller resolution  - 96 is standard for most computer screens. Hence the difference.

The difference stems from the fact that labels are defined in point sizes (ex: Arial 10pt, etc). The graphic gurus of the world  have decided that 72 points = 1 inch. But what exactly is 1 inch on a screen? Well, that depends on the screen's DPI (dots-per-inch). At 96 DPI,  1 inch = 96 dots. At 163 DPI, 1 Inch = 163 dots. So if you defined your label as 72 pt Arial, it would take up 96 dots on a map exported at 96 DPI, but it would take up 163 dots on map of 163 DPI. 163 is bigger than 96 (obviously) and so the labels are bigger.

If you like, you can change the dpi property of AGSDynamicMapServiceLayer to 96 and then the labels will have the familiar proportion you're expecting.

_
Divesh
0 Kudos
by Anonymous User
Not applicable
Original User: jdb1a1

Perfect.  Thanks!

Jeremy
0 Kudos