ArcGIS Server

Download Report

Transcript ArcGIS Server

ArcGIS Server
The Good, the Bad, and the
Ugly
Steve Foster
GIS Programmer
City of Frisco
What does Server do



1. Client requests a map from Server
by specifying layers and extent
2. Server renders the requested map
and returns an image (i.e. jpg) to the
client (Note: cached images are pre-rendered)
3. Client displays image for user
The Good
Available at www.ESRI.com
or your any ESRI salesman
The Good

Web application: Allows
distribution of spatial
data to anyone with a
browser

Map utilizes full window!

Centralized
management reduces
cost of ownership

Heir apparent to ArcIMS
Scalable
* Source: ESRI System Design Strategies
ArcGIS Mobile
Lightweight applications
that run on a variety of
platforms

Locally cached data for
disconnected operation,
Syncs when connected
Photos taken from www.ESRI.com/arcgismobile
Requires Advanced
Enterprise level of
Server $$$
The Good (continued)


Ability to integrate with Enterprise applications through web
services
Flexible
• Choose from Java or .NET

Powerful
• Custom geoprocessing tasks developed with Model builder
• Limited editing of layers
• Support for most ESRI extensions




Network Analyst
Spatial Analyst
3D Analyst
Sever Data Interoperability
Easy to create Out-OfThe-Box website
 Wizard based
 Relatively low skill level required
1. Use ArcMap to create your map document
2. Use ArcCatalog to publish map service
3. Use ArcGIS
Server Manager
to create your
website
OR Use Visual Studio with Map Template
Use ArcCatalog to Manage ArcGIS Server
Your Done!
It really is that easy
The Bad
Or at least not so good
The Bad

Web application
• Limited by the technology (HTML)

The best web apps don’t measure up to a good
desktop app
• Different browsers (IE, Netscape, Firefox, etc)
makes testing more difficult
• Timing problems in a multi-threaded
environment can be difficult to debug

Relatively new product, Support personnel
not up to speed yet
S
L
O
W
Source: System Design Strategies, Dave Peters, ESRI, 2007
Poor Documentation of ADF
Complex Development Environment


Much more complex than extending
ArcGIS desktop
Several different technologies
• HTML, ASP.NET, AJAX, VB and/or C#,
Jscript


Requires Microsoft Visual Studio
2005
Requires a fairly high skill level to
customize code
The UGLY
Bugs
 True curves causes errors in Identify
 Certain combinations of null and nonnull values in table cause search to fail
 Zoom function sometimes fails to
refresh map (Timing problem with window
resize event)
 Map tiles sometime fail to draw (source
file for toolbar incorrectly specified
App_Code\FriscoTools.vb)
 Caching does not work correctly when
“PrimaryMapLayer” is set to a non-cached
layer (Documentation omission).
 TOC collapses when refreshed (wrote my
own)
 TOC update contains 100’s of repeated
elements. (SP4)
 Dynamic rendering speed unnecessarily
slow. Depends on what layers are in the
map, not what is drawn.
 Custom cursors don’t behave correctly
Suggestions

If possible…wait for Server 9.3
•
•
•
•
•


Faster?
Improved Diagnostics (log files)
Major additions to Documentation
Microsoft ASP.NET AJAX Final release
Print task
Use Mozilla Firefox with Firebug extension
for debugging
Use Fiddler with IE (not as good but some
bugs limited to IE)
Use Visual Studio to set properties of controls
Edit the Source to reposition elements
Debugging: Monitor Event Viewer for ASP Errors
Optimization





Server is slow
Keep it simple
Cache everything possible / minimize
dynamic rendering
Keep symbology simple on dynamic
layers, Use optimized symbol set
Online seminar: Authoring and
Publishing Optimized Map Services
(http://training.esri.com/acb2000/showdetl.cfm?did=6&Product_id=908)
Client
Browser
Client
Browser
Client
Browser
Oops! I
didn’t
budget for
that!
Reverse
Proxy
Server
(ISA)
City of Frisco Server Configuration
Web
ArcGIS
(SOM, SOC)
Server
ArcServer:
Dual Xeon/Dual Core
3.0 GHz (8Gb)
ArcIMS
Server
(internal)
Frisco6:
Xeon
2.4 GHz (2Gb)
SDE /
SQL 2005
Server
ATLAS:
Client
Browser
WWW
DMZ
Secure Internal Network
Resources




ESRI Developer Network (EDN)
•
•
•
http://edn.esri.com/
Discussion Forums
Latest Documentation
•
•
•
•
•
ArcGIS Server (all editions) & extensions
ArcIMS
ArcGIS Engine & Extensions
ArcGIS Image Server
ArcView (+$500), ArcEditor(+$1500), ArcInfo (+$2500)
•
•
http://blogs.esri.com/Dev/blogs/arcgisserver/
Examples of code customization
EDN Media Kit ($1500/yr)
ESRI Developers Blog
ESRI Developer Summit
• March 17-20 Palm Springs

ESRI Training
•
Developing Applications with ArcGIS Server Using the Microsoft .NET Framework
EXAMPLES
Create an Error Log
Private Sub Page_Error(ByVal sender As System.Object, ByVal e As System.EventArgs)
Handles MyBase.Error
Dim exception As Exception = Server.GetLastError()
Server.ClearError()
My.Computer.FileSystem.WriteAllText("C:\ESRI_ArcGIS_Server\Log\Error.txt",
Date.Now.ToString("yyyy-MM-dd") & "," & Date.Now.ToString("HH:mm:ss") & "," &
Session.SessionID & ", PAGE ERROR TEXT: " & exception.ToString & vbCrLf, True)
callErrorPage("Page_Error", exception)
End Sub
•
Note: Add to Default.aspx.vb
Toolbar: Adding Tools & Commands

Sample TOOL
•
•
•
•
•
•
Sub ServerAction(ByVal args As ToolEventArgs) Implements IMapServerToolAction.ServerAction
Dim map As ESRI.ArcGIS.ADF.Web.UI.WebControls.Map = CType(args.Control, ESRI.ArcGIS.ADF.Web.UI.WebControls.Map)
•
•
Dim pea As RectangleEventArgs = CType(args, RectangleEventArgs)
Dim peanut As System.Drawing.Rectangle = pea.ScreenExtent
•
•
•
•
•
•
•
•
•
•
•
If peanut.Height < 15 And peanut.Width < 15 Then
Dim center As Integer
'Y
center = peanut.Y + (peanut.Height / 2)
peanut.Height = map.Height.Value / 2
peanut.Y = center - (map.Height.Value / 4)
'X
center = peanut.X + (peanut.Width / 2)
peanut.Width = map.Width.Value / 2
peanut.X = center - (map.Width.Value / 4)
End If
•
•
•
map.Zoom(peanut, True)
•

' Zoom in to the rectangle area defined by user.
Public Class ZoomRect
Implements IMapServerToolAction
End Sub 'IMapServerToolAction.ServerAction
End Class 'ZoomRect
Sample COMMAND
•
•
•
•
•
•
•
•
' Zoom to the Extent of City
Public Class ZoomFullExtent
Implements IMapServerCommandAction
Sub ServerAction(ByVal info As ToolbarItemInfo) Implements IServerAction.ServerAction
Dim map As ESRI.ArcGIS.ADF.Web.UI.WebControls.Map = CType(info.BuddyControls(0),
ESRI.ArcGIS.ADF.Web.UI.WebControls.Map)
map.Extent = New ESRI.ArcGIS.ADF.Web.Geometry.Envelope(2450000, 7080000, 2511000, 7132000)
End Sub 'IMapServerToolAction.ServerAction
End Class
Frisco GIS Team





Susan Olson
John Morley
Amy Rose
Bud Videan
Brian Macke
Coming Attractions




NCTCOG Regional GIS Meeting
May 22, 2008
Frisco City Hall (96°50’4”W 33°9’N)
Integration of Spatial and Business
data systems at the City of Frisco
Demonstration



Frisco Interactive maps at
http://maps.friscotexas.gov/
Frisco Home page:
www.friscotexas.gov
This presentation will be available on
our GIS page