optimizing your map services
DESCRIPTION
Presentation about map services by Sterling Quinn on Esri European User Conference 2011.TRANSCRIPT
![Page 1: Optimizing your Map Services](https://reader038.vdocuments.us/reader038/viewer/2022103017/557bc9c5d8b42a700d8b4d18/html5/thumbnails/1.jpg)
Optimizing your map servicesOptomizando tus servicios de mapasOptomizando tus servicios de mapas
Sterling Quinn
![Page 2: Optimizing your Map Services](https://reader038.vdocuments.us/reader038/viewer/2022103017/557bc9c5d8b42a700d8b4d18/html5/thumbnails/2.jpg)
What’s in this session
• Map service planning and design
• Ways to serve your maps- Cached tiles
- Dynamic map service
- Client-side graphics
• Authoring a good web map
• Performance tips for map services
![Page 3: Optimizing your Map Services](https://reader038.vdocuments.us/reader038/viewer/2022103017/557bc9c5d8b42a700d8b4d18/html5/thumbnails/3.jpg)
How web maps have changed!
![Page 4: Optimizing your Map Services](https://reader038.vdocuments.us/reader038/viewer/2022103017/557bc9c5d8b42a700d8b4d18/html5/thumbnails/4.jpg)
Organize data into logical groupings
BasemapsBasemaps
Geographic frame of referenceGeographic frame of reference
Contain static vector Contain static vector and and raster dataraster data
Operational Layers Operational Layers
Show a focused item of interestShow a focused item of interest
Support functionality Support functionality of the applicationof the application
Reusable in multiple applicationsReusable in multiple applications Displayed on top of base mapDisplayed on top of base map
![Page 5: Optimizing your Map Services](https://reader038.vdocuments.us/reader038/viewer/2022103017/557bc9c5d8b42a700d8b4d18/html5/thumbnails/5.jpg)
Case study: Google Maps
![Page 6: Optimizing your Map Services](https://reader038.vdocuments.us/reader038/viewer/2022103017/557bc9c5d8b42a700d8b4d18/html5/thumbnails/6.jpg)
Google Maps base maps
“Map”“Map”•• HighwaysHighways•• StreetsStreets•• FerriesFerries•• RailroadsRailroads•• Transit centersTransit centers•• CitiesCities•• ParksParks
•• ImageryImagery•• Source informationSource information
“Satellite”“Satellite”•• Shaded reliefShaded relief•• VegetationVegetation•• HighwaysHighways•• StreetsStreets•• CitiesCities•• ParksParks•• Military reservationsMilitary reservations
““TerrainTerrain””
•• ParksParks•• Military reservationsMilitary reservations•• Municipal boundariesMunicipal boundaries•• LakesLakes•• RiversRivers•• Golf coursesGolf courses•• HospitalsHospitals•• Shopping centersShopping centers•• AirportsAirports•• CollegesColleges•• CemeteriesCemeteries•• Amusement parksAmusement parks
•• Military reservationsMilitary reservations•• Municipal boundariesMunicipal boundaries•• LakesLakes•• RiversRivers•• Golf coursesGolf courses•• HospitalsHospitals•• Shopping centersShopping centers•• AirportsAirports•• CollegesColleges•• CemeteriesCemeteries•• Amusement parksAmusement parks
![Page 7: Optimizing your Map Services](https://reader038.vdocuments.us/reader038/viewer/2022103017/557bc9c5d8b42a700d8b4d18/html5/thumbnails/7.jpg)
Google Maps operational layers
• Street overlay for imagery
• Traffic
• Photos
• Videos• Videos
• Wikipedia
• StreetView coverage
• Web cams
• Bicycle routes
![Page 8: Optimizing your Map Services](https://reader038.vdocuments.us/reader038/viewer/2022103017/557bc9c5d8b42a700d8b4d18/html5/thumbnails/8.jpg)
Some ArcGIS Server examples
• Orange County Property Appraiser Map
• City of St George
• North Vancouver Projects
• Solar Boston
• City of Greeley Property Information Map
![Page 9: Optimizing your Map Services](https://reader038.vdocuments.us/reader038/viewer/2022103017/557bc9c5d8b42a700d8b4d18/html5/thumbnails/9.jpg)
Ways to serve your maps
![Page 10: Optimizing your Map Services](https://reader038.vdocuments.us/reader038/viewer/2022103017/557bc9c5d8b42a700d8b4d18/html5/thumbnails/10.jpg)
Three options for displaying map services
• As cached tiles
• As a dynamically drawn image
• As client-side graphics
![Page 11: Optimizing your Map Services](https://reader038.vdocuments.us/reader038/viewer/2022103017/557bc9c5d8b42a700d8b4d18/html5/thumbnails/11.jpg)
Cached tiles
• Pre-draw map tiles and serve them to clients
• Best performance and scalability
• Standard for online maps (Google, Bing, Yahoo, etc)• Standard for online maps (Google, Bing, Yahoo, etc)
• Requires you to create and maintain cache
![Page 12: Optimizing your Map Services](https://reader038.vdocuments.us/reader038/viewer/2022103017/557bc9c5d8b42a700d8b4d18/html5/thumbnails/12.jpg)
What should you cache?
• Base maps
• Operational layers that satisfy one of the followin g:- High volumes of traffic
- Don’t change often
- Cover small scales only
![Page 13: Optimizing your Map Services](https://reader038.vdocuments.us/reader038/viewer/2022103017/557bc9c5d8b42a700d8b4d18/html5/thumbnails/13.jpg)
Cache image formats
• JPEG or MIXED for most basemaps- High quality (~90) for vectors
- Lower quality (55 – 75) for imagery
• PNG 32 for overlay networks (boundaries, roads)
• MIXED or PNG for other overlays
![Page 14: Optimizing your Map Services](https://reader038.vdocuments.us/reader038/viewer/2022103017/557bc9c5d8b42a700d8b4d18/html5/thumbnails/14.jpg)
Dynamically drawn map services
• Server retrieves data, draws an image, sends image to client
• Slower than caching, but may be satisfactory using optimized map serviceoptimized map service
![Page 15: Optimizing your Map Services](https://reader038.vdocuments.us/reader038/viewer/2022103017/557bc9c5d8b42a700d8b4d18/html5/thumbnails/15.jpg)
Data that’s OK to draw dynamically
• Real-time data
• Frequently-changing data with large scope
• Internal maps accessed by just a few people
![Page 16: Optimizing your Map Services](https://reader038.vdocuments.us/reader038/viewer/2022103017/557bc9c5d8b42a700d8b4d18/html5/thumbnails/16.jpg)
Two types of files can support a map service
Map service definition .MSD
Map document .MXDOR
Map service
Optimized map service
Traditional map service
![Page 17: Optimizing your Map Services](https://reader038.vdocuments.us/reader038/viewer/2022103017/557bc9c5d8b42a700d8b4d18/html5/thumbnails/17.jpg)
Optimized map services
• Obtained through Map Services Publishing toolbar in ArcMap
• Supports the most common layer and symbol types
• Faster dynamic drawing than ArcIMS
![Page 18: Optimizing your Map Services](https://reader038.vdocuments.us/reader038/viewer/2022103017/557bc9c5d8b42a700d8b4d18/html5/thumbnails/18.jpg)
Publishing an optimized map service
Demo
![Page 19: Optimizing your Map Services](https://reader038.vdocuments.us/reader038/viewer/2022103017/557bc9c5d8b42a700d8b4d18/html5/thumbnails/19.jpg)
Antialiasing with optimized map services
• Improves visual quality
• Slight performance cost- Use Preview button to see
effect on performance
![Page 20: Optimizing your Map Services](https://reader038.vdocuments.us/reader038/viewer/2022103017/557bc9c5d8b42a700d8b4d18/html5/thumbnails/20.jpg)
What’s available through optimized services?
• Most data and layer types- You’ll get an Error in analyzer if not supported
• New at 10.0: Maplex and cartographic representations- Recommended for caching only
![Page 21: Optimizing your Map Services](https://reader038.vdocuments.us/reader038/viewer/2022103017/557bc9c5d8b42a700d8b4d18/html5/thumbnails/21.jpg)
If you have to use an MXD-based service…
• Move whatever layers you can into a separate optimized map service
• Use ESRI_Optimized style for drawing
• Still use the Analyze button to catch performance warnings
![Page 22: Optimizing your Map Services](https://reader038.vdocuments.us/reader038/viewer/2022103017/557bc9c5d8b42a700d8b4d18/html5/thumbnails/22.jpg)
Client-side graphics
• “Data on demand” pattern treats map service as a feature server
- Queries from map services
- Feature services
Server sends geometries and attributes to client• Server sends geometries and attributes to client
• Features drawn in browser
![Page 23: Optimizing your Map Services](https://reader038.vdocuments.us/reader038/viewer/2022103017/557bc9c5d8b42a700d8b4d18/html5/thumbnails/23.jpg)
What should you draw with client-side graphics?
• Query or geoprocessing results
• Layers that need to be thematically symbolized on the fly
- National Center for Education Statistics
• Web editing: Feature Services
• Interactive operational layers for mashups
![Page 24: Optimizing your Map Services](https://reader038.vdocuments.us/reader038/viewer/2022103017/557bc9c5d8b42a700d8b4d18/html5/thumbnails/24.jpg)
ArcGIS Server Blog Posts
• Determining Limits for Map Graphics
• High Performance Web Map with Large Dataset as FeatureLayer
• Out of Box Vector Tiling using FeatureLayer
• FeatureLayer can Generalize Geometries on the fly
![Page 25: Optimizing your Map Services](https://reader038.vdocuments.us/reader038/viewer/2022103017/557bc9c5d8b42a700d8b4d18/html5/thumbnails/25.jpg)
maxAllowa… what?
maxAllowableOffset:• a way of reducing the number of points in a curve
• Suggestion: a feature’s geometry should not display more than one vertex per pixel
![Page 26: Optimizing your Map Services](https://reader038.vdocuments.us/reader038/viewer/2022103017/557bc9c5d8b42a700d8b4d18/html5/thumbnails/26.jpg)
Graphics performance considerations
• Generalize geometries- Do not generalize geometries in Editing scenario
• Be careful not to request too many features- Scale dependencies with Feature Services
• Beware of server limits on number of features that can be returned
- Default 1000
• Beware “1=1” firewall filters
![Page 27: Optimizing your Map Services](https://reader038.vdocuments.us/reader038/viewer/2022103017/557bc9c5d8b42a700d8b4d18/html5/thumbnails/27.jpg)
Where can I learn more about these techniques?
• Implementation differs depending on the web API being used
• Online examples at the ArcGIS Resource Center
![Page 28: Optimizing your Map Services](https://reader038.vdocuments.us/reader038/viewer/2022103017/557bc9c5d8b42a700d8b4d18/html5/thumbnails/28.jpg)
Performance tips for map servicesservices
![Page 29: Optimizing your Map Services](https://reader038.vdocuments.us/reader038/viewer/2022103017/557bc9c5d8b42a700d8b4d18/html5/thumbnails/29.jpg)
Pre-compute when possible
• Cache
• Annotation
• Projection- Tip: You can re-project geodatabase features during
replication
• Spatial indexes- Keep up to date
- Correct size relative to map extent
• Query or geoprocessing results
![Page 30: Optimizing your Map Services](https://reader038.vdocuments.us/reader038/viewer/2022103017/557bc9c5d8b42a700d8b4d18/html5/thumbnails/30.jpg)
Data access tips
• Tune ArcSDE (direct connect recommended)
• Avoid UNC paths for file-based data
• Avoid downloading all attributes unless you have to
• Attribute indexes• Attribute indexes- Use for joins and common queries
• Precalculate query or tool results- Example: Solar Boston
![Page 31: Optimizing your Map Services](https://reader038.vdocuments.us/reader038/viewer/2022103017/557bc9c5d8b42a700d8b4d18/html5/thumbnails/31.jpg)
A u t h o r i n g a g o o d w e b m a p
![Page 32: Optimizing your Map Services](https://reader038.vdocuments.us/reader038/viewer/2022103017/557bc9c5d8b42a700d8b4d18/html5/thumbnails/32.jpg)
Start with a template
• Fully functional apps, maps and data
- Esri: Resources.arcgis.com- User Communities
- Community: www.arcgis.com > - Community: www.arcgis.com > Gallery
- Look for “Configurable”
- Download and point at your own data
![Page 33: Optimizing your Map Services](https://reader038.vdocuments.us/reader038/viewer/2022103017/557bc9c5d8b42a700d8b4d18/html5/thumbnails/33.jpg)
Building a basemap from a template
Demo
![Page 34: Optimizing your Map Services](https://reader038.vdocuments.us/reader038/viewer/2022103017/557bc9c5d8b42a700d8b4d18/html5/thumbnails/34.jpg)
Authoring a basemap from scratch
• Only a good option if there are no templates
• Design map for cache scales- Add your tiling scheme scales
to the ArcMap dropdown list
• Group layers by scale level- Only have to set the scale range
at the group layer level
- Copy layers between groups
![Page 35: Optimizing your Map Services](https://reader038.vdocuments.us/reader038/viewer/2022103017/557bc9c5d8b42a700d8b4d18/html5/thumbnails/35.jpg)
Authoring mobile mapsSpecific cartography for mobility
• Design for purpose- Remove unnecessary layers of information
- Set scale dependency (walk, drive, etc)
- Render editable layers to define feature typestypes
• Design for the environment- Establish contrast, choose meaningful
symbology
SunlightSunlightwashes washes outoutColorsColors
![Page 36: Optimizing your Map Services](https://reader038.vdocuments.us/reader038/viewer/2022103017/557bc9c5d8b42a700d8b4d18/html5/thumbnails/36.jpg)
Authoring for feature service: symbology
• Rendered in the client
• Symbols can be Simple (Marker, Line, Fill) or Pictu re (Marker, Fill)
- Complex symbols are converted to picture (PNG)Most point symbols reproduced well – test- Most point symbols reproduced well – test
- Avoid gradient fills
ArcMapWebMap
![Page 37: Optimizing your Map Services](https://reader038.vdocuments.us/reader038/viewer/2022103017/557bc9c5d8b42a700d8b4d18/html5/thumbnails/37.jpg)
Sneak peek: Changing symbology on the fly at 10.1
• Modify symbols without downloading geometries on the client side
- Useful when there are a lot of features
• Maps are drawn at the server sideOnly image is returned to the client- Only image is returned to the client
• Helper function on the server side to compute class breaks
![Page 38: Optimizing your Map Services](https://reader038.vdocuments.us/reader038/viewer/2022103017/557bc9c5d8b42a700d8b4d18/html5/thumbnails/38.jpg)
Server side thematic mapping at 10.1
Demo
![Page 39: Optimizing your Map Services](https://reader038.vdocuments.us/reader038/viewer/2022103017/557bc9c5d8b42a700d8b4d18/html5/thumbnails/39.jpg)
Review
• Organize map services in logical groups- Base maps
- Operational layers
• Use a high-performance blend of display techniques- Cached tiles
- Dynamically drawn services
- Client-side graphics
• Follow performance tips, pre-computing when possible
![Page 40: Optimizing your Map Services](https://reader038.vdocuments.us/reader038/viewer/2022103017/557bc9c5d8b42a700d8b4d18/html5/thumbnails/40.jpg)
Q u e s t i o n s
![Page 41: Optimizing your Map Services](https://reader038.vdocuments.us/reader038/viewer/2022103017/557bc9c5d8b42a700d8b4d18/html5/thumbnails/41.jpg)