You are on page 1of 47

Introduction to ESRI MapIt

Transcript

Copyright 2009 ESRI All rights reserved. Printed in the United States of America. The information contained in this document is the exclusive property of ESRI. This work is protected under United States copyright law and other international copyright treaties and conventions. No part of this work may be reproduced or transmitted in any form or by any means, electronic or mechanical, including photocopying and recording, or by any information storage or retrieval system, except as expressly permitted in writing by ESRI. All requests should be sent to Attention: Contracts and Legal Services Manager, ESRI, 380 New York Street, Redlands, CA 92373-8100 USA. The information contained in this document is subject to change without notice. U.S. GOVERNMENT RESTRICTED/LIMITED RIGHTS Any software, documentation, and/or data delivered hereunder is subject to the terms of the License Agreement. In no event shall the U.S. Government acquire greater than RESTRICTED/LIMITED RIGHTS. At a minimum, use, duplication, or disclosure by the U.S. Government is subject to restrictions as set forth in FAR 52.227-14 Alternates I, II, and III (JUN 1987); FAR 52.227-19 (JUN 1987) and/or FAR 12.211/12.212 (Commercial Technical Data/Computer Software); and DFARS 252.227-7015 (NOV 1995) (Technical Data) and/or DFARS 227.7202 (Computer Software), as applicable. Contractor/Manufacturer is ESRI, 380 New York Street, Redlands, CA 92373-8100 USA. @esri.com, 3D Analyst, ACORN, Address Coder, ADF, AML, ArcAtlas, ArcCAD, ArcCatalog, ArcCOGO, ArcData, ArcDoc, ArcEdit, ArcEditor, ArcEurope, ArcExplorer, ArcExpress, ArcGIS, ArcGlobe, ArcGrid, ArcIMS, ARC/INFO, ArcInfo, ArcInfo Librarian, ArcInfoProfessional GIS, ArcInfoThe World's GIS, ArcLessons, ArcLocation, ArcLogistics, ArcMap, ArcNetwork, ArcNews, ArcObjects, ArcOpen, ArcPad, ArcPlot, ArcPress, ArcQuest, ArcReader, ArcScan, ArcScene, ArcSchool, ArcScripts, ArcSDE, ArcSdl, ArcSketch, ArcStorm, ArcSurvey, ArcTIN, ArcToolbox, ArcTools, ArcUSA, ArcUser, ArcView, ArcVoyager, ArcWatch, ArcWeb, ArcWorld, ArcXML, Atlas GIS, AtlasWare, Avenue, Business Analyst Online, BusinessMAP, CommunityInfo, Data Automation Kit, Database Integrator, DBI Kit, EDN, ESRI, ESRI BIS, ESRITeam GIS, ESRIThe GIS Company, ESRIThe GIS People, ESRIThe GIS Software Leader, FormEdit, GeoCollector, Geographic Design System, Geography Matters, Geography Network, GIS by ESRI, GIS Data ReViewer, GIS Day, GIS for Everyone, GISData Server, JTX, MapBeans, MapCaf, MapData, MapObjects, Maplex, MapStudio, ModelBuilder, MOLE, MPS-Atlas, NetEngine, PC ARC/INFO, PC ARCPLOT, PC ARCSHELL, PC DATA CONVERSION, PC STARTER KIT, PC TABLES, PC ARCEDIT, PC NETWORK, PC OVERLAY, PLTS, Rent-a-Tech, RouteMAP, SDE, SiteReporter, SML, SourcebookAmerica, Spatial Database Engine, StreetEditor, StreetMap, Tapestry, the ARC/INFO logo, the ArcAtlas logo, the ArcCAD logo, the ArcCAD WorkBench logo, the ArcCOGO logo, the ArcData logo, the ArcData Online logo, the ArcEdit logo, the ArcEurope logo, the ArcExplorer logo, the ArcExpress logo, the ArcGIS logo, the ArcGIS Explorer logo, the ArcGrid logo, the ArcIMS logo, the ArcInfo logo, the ArcLogistics Route logo, the ArcNetwork logo, the ArcPad logo, the ArcPlot logo, the ArcPress for ArcView logo, the ArcPress logo, the ArcScan logo, the ArcScene logo, the ArcSDE CAD Client logo, the ArcSDE logo, the ArcStorm logo, the ArcTIN logo, the ArcTools logo, the ArcUSA logo, the ArcView 3D Analyst logo, the ArcView Data Publisher logo, the ArcView GIS logo, the ArcView Image Analysis logo, the ArcView Internet Map Server logo, the ArcView logo, the ArcView Network Analyst logo, the ArcView Spatial Analyst logo, the ArcView StreetMap 2000 logo, the ArcView StreetMap logo, the ArcView Tracking Analyst logo, the ArcWorld logo, the Atlas GIS logo, the Avenue logo, the BusinessMAP logo, the Data Automation Kit logo, the Digital Chart of the World logo, the ESRI Data logo, the ESRI globe logo, the ESRI Press logo, the Geography Network logo, the GIS Day logo, the MapCaf logo, the MapObjects Internet Map Server logo, the MapObjects logo, the MOLE logo, the NetEngine logo, the PC ARC/INFO logo, the Production Line Tool Set logo, the RouteMAP IMS logo, the RouteMAP logo, the SDE logo, The Geographic Advantage, The Geographic Approach, The World's Leading Desktop GIS, Water Writes, www.esri.com, www.esribis.com, www.geographynetwork.com, www.gis.com, www.gisday.com, and Your Personal Geographic Information System are trademarks, registered trademarks, or service marks of ESRI in the United States, the European Community, or certain other jurisdictions. Other companies and products mentioned herein may be trademarks or registered trademarks of their respective trademark owners.

Introduction to ESRI MapIt


Presenter: Rex Hansen ESRI Redlands, CA

Hello and welcome to the Introduction to the ESRI MapIt Training Seminar. My name is Rex Hansen, and I'm a senior product engineer with the .NET server development team.

Copyright 2009 ESRI. All rights reserved.

Seminar overview
Topics
What is ESRI MapIt? Prepare your data Serve your data Use your data

Format
Topics are followed by software demonstrations and reviews.

Copyright ESRI. All rights reserved.

Today we'll discuss ESRI MapIt products. After a brief introduction, we'll focus on how to prepare, serve, and use your data using product features included with MapIt. Each section will be followed by a demonstration.

Copyright 2009 ESRI. All rights reserved.

What is ESRI MapIt?

Copyright ESRI. All rights reserved.

So what is ESRI MapIt?

Copyright 2009 ESRI. All rights reserved.

Product overview
New mapping product Helps prepare your data for use in mapping applications

Copyright ESRI. All rights reserved.

ESRI MapIt is a new software and services solution which allows your organization to quickly create highly interactive maps in your Microsoft SQL Server and Excel data, which can be shared virtually anywhere through SharePoint portals, Silverlight Web-based applications, and desktop applications. Technically, it's designed as a lightweight Web mapping solution to prepare, serve, and use spatially enabled data stored in SQL Server 2008. Much of your data may have a geographic component that defines a location and allows it to be displayed in the map. MapIt provides the tools you need to make this possible.

Copyright 2009 ESRI. All rights reserved.

Product overview
New mapping product Helps prepare your data for use in mapping applications REST-ful services for rich, interactive client applications Natively supports both 32- and 64-bit Windows

Copyright ESRI. All rights reserved.

MapIt includes a REST-ful interface for consuming spatially enabled data and SQL Server. A set of clients is packaged with the product, a Silverlight WPF API for building rich, interactive Web and desktop client applications, and an out-of-the-box mapping Web Part for SharePoint sites. All MapIt features are supported in pure 64- and 32-bit environments.

Copyright 2009 ESRI. All rights reserved.

Product overview
New mapping product Helps prepare your data for use in mapping applications REST-ful services for rich, interactive client applications Natively supports both 32- and 64-bit Windows Takes advantage of existing investments
Microsoft IIS SharePoint Office SQL Server 2008 Silverlight/WPF

Copyright ESRI. All rights reserved.

MapIt enables you to take advantage of existing infrastructure to manage, serve, and use geographic data. No modifications or schemas or data types with SQL Server are required. Instead, native capabilities for using geographic data and SQL Server are leveraged. Likewise, serving data on your SQL Server instance is enabled via an ArcIMS Web service that connects to your instance using standard methods. You can then use your data for interactive mapping applications that you can build using a Microsoft Silverlight or Windows Presentation Foundation, or WPF, and host within SharePoint.

Copyright 2009 ESRI. All rights reserved.

What MapIt does for you


Spatially visualizes data
Point and area data Shows patterns and relationships

Copyright ESRI. All rights reserved.

So what does MapIt do for you? Basically, MapIt allows your users to easily explore the geographic components of your organization's data. Your map's data can create a powerful visual tool for decision making, exposing trends that might otherwise remain hidden.

Copyright 2009 ESRI. All rights reserved.

What MapIt does for you


Spatially visualizes data
Point and area data Shows patterns and relationships

Integrates with the Cloud


Data and services
Bing and ArcGIS Online Demographics and business data

Copyright ESRI. All rights reserved.

MapIt supports integration with public services and deployment for public use. This means use with Internet services and data, affectionately termed the cloud. This includes the Microsoft du jour services platform. In general, data, services, and applications created and hosted using MapIt features can be incorporated with other business data and services to devise effective solutions and presents intuitive and aesthetic results.

Copyright 2009 ESRI. All rights reserved.

Workflow overview
Prepare
Spatial Data Assistant
Assists loading geo data into SQL Server 2008 Spatially enables existing SQL tables

Copyright ESRI. All rights reserved.

In general, MapIt supports a prepare, serve, and use workflow. Prepare involves creating, managing, or manipulating data in SQL Server. MapIt includes a stand-alone WPF application, a Spatial Data Assistant, which enables you to load geoenabled data into SQL server, or spatially enable existing SQL tables.

Copyright 2009 ESRI. All rights reserved.

Workflow overview
Prepare
Spatial Data Assistant
Assists loading geo data into SQL Server 2008 Spatially enables existing SQL tables

Serve
Spatial Data Service
Web service for SQL Server Spatial

Copyright ESRI. All rights reserved.

Serve involves exposing your SQL Server data via standard Web service protocol. MapIt includes the Spatial Data Service as a REST-ful Web service. This means a client can use the lightweight REST format over HTTP to communicate with the Spatial Data Service and query geographic data tables in SQL Server.

Copyright 2009 ESRI. All rights reserved.

10

Workflow overview
Prepare
Spatial Data Assistant
Assists loading geo data into SQL Server 2008 Spatially enables existing SQL tables

Serve
Spatial Data Service
Web service for SQL Server Spatial

Use
Mapping components and Cloud services for your applications ESRI Map Web part to add mapping to SharePoint Silverlight\WPF API to build rich Web and desktop client applications

Copyright ESRI. All rights reserved.

Use involves creating an application to consume tables within SQL Server using the Spatial Data Service. Two premier clients are included with MapIt. The ArcGIS API for Microsoft Silverlight and WPF is a lightweight mapping API for developers to create rich Web, Silverlight, or desktop WPF clients. The ESRI Map Web Part for Microsoft SharePoint is an in-the-box, deployable SharePoint Web Part that contains a map built on the Silverlight platform. The map is configured in SharePoint at runtime via a user interface that allows you to choose a basemap, add operational layers, SharePoint lists, MapIt services, or ArcGIS Server map services. It also allows you to use operational layer properties and define those properties such as name, transparency, field aliases, and symbology.

Copyright 2009 ESRI. All rights reserved.

11

Software demonstration

Copyright ESRI. All rights reserved.

Let's move on to the software demonstration portion. Let's step to the install to see what features are included with the product, and how they're initially configured. First, you'll download the 32-bit or 64-bit version of the product, depending on the platform you're installing on. Note we also offer a trial version for you to test the functionality of the product before purchase. If you haven't already, visit www.esri.com/mapit for more information. In this case, I'm installing on Windows Server 2003, 32-bit. I'll start the 32-bit setup, and step through the dialogs. We'll accept the license agreement and go to the next page which lists the features in MapIt. Well see Spatial Data Assistant, Spatial Data Service, Web client API, which is the Silverlight/WPF API, and the ESRI Map Web Part for SharePoint. Now we actually need to configure the Spatial Data Service. First, I need to choose an IS server in which I want to install the ASP .NET service. I have a number of servers available, one of which I created explicitly to support the Spatial Data Service. I call it IS Server for MapIt; it's hosted on port 82. Note here I also have a couple of SharePoint servers which we'll use later in the session.

Copyright 2009 ESRI. All rights reserved.

12

In this case I need to define the name of the virtual director for the service. The default is the acronym SDS, short for Spatial Data Service, but I can choose whatever I'd like to. I'm going to accept the defaults and go to the next dialog. In this dialog I need to define the server and the SQL Server instance of the service that I'll connect to. It's on a different machine. I'm going to type in the name here and the instance name. I'm using SQL Express 2008. I also must enter user credentials, either Windows or SQL Server. The service will use these credentials to connect to SQL Server, so these credentials will be encrypted within the Web config of the ASP .NET service. Note, the set up will check the validity of the SQL Server instance. If a SQL account is specified, it will attempt to connect. If a Windows account is specified, it will only check to make sure it's a valid Windows account; it will not connect. In this case, I'll specify a SQL Server account that I've created. I need to have at least selected privileges on tables within a specific schema or database reader privileges for this specific account within SQL Server to be able to query tabular data. We'll proceed with the install. You'll note that it's relatively quick. Lay down our components, each of the features. When we're finished, we should be prompted with a license configuration utility. So the license configuration utility shows us a couple of options. We can use the evaluation version by default, or we can use the licensed version. Note that the evaluation version is limited to 60-day trial. So the first time you use the Spatial Data Assistant, or the Spatial Data Service, it will time out after 60 days. The spatial data system is limited to geocoding 100 records, or loading 100 records from a shapefile. The Spatial Data Service is limited to returning 100 records from query. In this case we're going to use the licensed version, and assuming we purchased a license, I can navigate out to a location that I had my license, reference it from the dialog and get a notification that my license configuration has succeeded. Note also that we have a set of program menu items that have been added. We're going to step through for the remainder of this session, each of these program items, and see how each is used within the MapIt workflow.

Copyright 2009 ESRI. All rights reserved.

13

Review
The MapIt product includes the following features
Spatial Data Assistant Spatial Data Service ArcGIS API for Microsoft Silverlight/WPF ESRI Map Web Part for Microsoft SharePoint

Copyright ESRI. All rights reserved.

So to review, installation of MapIt includes four components. The Spatial Data Assistant, the Spatial Data Service, the ArcGIS API for Microsoft Silverlight APF, and the ESRI Map Web Part for Microsoft SharePoint. We'll cover each of these in more detail in the sections to come.

Copyright 2009 ESRI. All rights reserved.

14

Prepare your data

Copyright ESRI. All rights reserved.

After installation, the first step in the workflow involves preparing your data.

Copyright 2009 ESRI. All rights reserved.

15

Spatial Data Assistant


Helps prepare data for use with mapping applications
Assign locations to SQL Server data using address fields Load standard ESRI shapefiles into SQL Server
Open format commonly used for sharing geographic data

Load standard geographies from an ESRI Web site


Available for free from a standard data catalog

Copyright ESRI. All rights reserved.

The Spatial Data Assistant is a stand-alone WPF application that assists you in preparing your data for use in a mapping application. It assists you in three ways. One, it assigns locations or geography, in tables and SQL Server that contain address information. Two, it enables you to load your own spatial data stored in a shapefile format into SQL Server. Note that the shapefile is a common standard used to share geographic data. And three, ESRI provides a set of free geographic datasets you can load directly into SQL server.

Copyright 2009 ESRI. All rights reserved.

16

Software demonstration

Copyright ESRI. All rights reserved.

So, let's see the Spatial Data Assistant in action. So let's get started with the Spatial Data Assistant. I'm going to show a Windows Server 2003 machine, 32-bit. I'm going to navigate to the program menu item for Spatial Data Assistant, which we've just installed. And in this dialog, I'll be able to specify the server name and the instance that I want to connect to. Then I can define Windows or SQL Server authentication. In this case I'm going to use my Windows account, which has write privileges to the database. Two dialogs are provided, one to create points from addresses, and another to load spatial data. What I'd like to do is create points from addresses. On SLQ Server I have a database with a table that contains addresses without geography. There's no spatial component in this table. This is on my SQL Server machine, the machine where I have my SQL Server instance running using SQL Server Management Studio to view this table. You can see in my databases I have a demo database, and I have a table named LmbrStores. In LmbrStores, I have some address information that I'd like to geocode. Addresses including the address field, ZIP, city, and state. What I'd like to do is assign a geometry column to this, and use the address to generate a location, known as geocoding. So let's click on the Create points from address and I'll specify the databasedemoand the table that contains my address information, LmbrStores. But I can also show advanced options here. It gives me the ability to assign a spatial reference to align my data geographically. I can define either a Bing Maps spatial reference, which is in the Mercator projection. I can use ArcGIS Online, which uses a geographic. I can also define a well-known ID of a spatial
Copyright 2009 ESRI. All rights reserved.

17

reference if I so choose. In this case I'm going to use the ArcGIS Online data, or geographic spatial reference. I can also choose the service that I want to use to generate my locations for my address attribute information. Bing Maps provides a geocode service that enables me to use either the productionlevel services or staging services. Now Bing Maps requires a developer account to access both. If we want access to production services, you need to purchase a license. If you haven't purchased a license, you can use their staging environment. ArcGIS Online provides a set of services that enables you to find locations or geocode to North America or European addresses. In this case, my addresses happen to be in North America, so I'll select that option. Lets go on to the next dialog. In this dialog, depending on which service I've chosen, I need to match the fields in my table to this address inputs to the service. Note that some fields are already matched based on naming assumptions. I'll specify the state, since that wasn't defined, the state province which happens to be a field in my SQL Server table, and I'll click on Create points. Note that once the process is initiated, the application will provide feedback as to the progress of the operation. Note that the desktop application is communicating with the remote service, passing attribute information to determine a geocode location. When geocoding, there are often different scores, or match scores or reliability ratings, based upon the match between the attribute information and the base layer or reference data that the service provides. When the geocode process is finished, we'll get a brief summary to show the results of the process and what to expect when we view our data. When completed, we'll go back to the machine that has my SQL Server instance on it and take a look at the table and see how it's changed. Okay, out of 332 records, they were all located successfully. It looks like there were multiple matches for a couple, for most of those, and we selected the first match, or the best match when generating a location. Let's go back to the SQL instance. We should see our spatial results. There they are in the shape column. There's also in SQL Server Management Studio one of the spatial types capabilities within SQL Server 2008. We can also get spatial results, so we can see the spatial component within Management Studio, and get an idea using this Cartesian coordinate system, where those points show up on a grid. Great. So it looks like our address information was geocoded successfully. Let's move on to the other option, loading existing spatial data into SQL Server. I'll click on Load spatial data, and this enables you to select between either a catalog of standard datasets, which

Copyright 2009 ESRI. All rights reserved.

18

are hosted by ESRI, or you can load your own shapefile into SQL Server. In this session we're going to select a standard dataset. We'll navigate to something reasonably lightweight, in this case the U.S. states. Note here we have both United States and world data available. I'll click Next to define which database I want to load this into. I'll specify U.S. states. I'm going to load this as geographic, so I'll specify the geographic name. In my advanced options, I can define the spatial reference I want to use to assign this spatial data when it's loaded into its SQL Server instance, and I can click Load data. The application will go out to the standard geography, download that geography, and load it within my SQL Server instance. Note also the help system that comes with MapIt. This provides you with a variety of information in detail associated with using the Spatial Data Assistant. So if you need additional information on working with the Spatial Data Assistant, this is a great place to start.

Copyright 2009 ESRI. All rights reserved.

19

Review
Spatial Data Assistant helps you Add data to SQL Server Spatially enable data in SQL Server

Copyright ESRI. All rights reserved.

So to review, the Spatial Data Assistant gives you the ability to add geographic data to SQL Server, and spatially enable the data with the locational components, such as addresses, already in SQL Server. Note we're merely working with the spatial types inherent to SQL Server 2008. The Spatial Data Assistant makes it easier to generate or modify data using these spatial types, but you can use other utilities, functions, and tools to generate spatial data in SQL Server as well.

Copyright 2009 ESRI. All rights reserved.

20

Serve your data

Copyright ESRI. All rights reserved.

A pivotal step in exposing spatial data hosted in SQL Server is providing a common standard format by which clients can query and consume data.

Copyright 2009 ESRI. All rights reserved.

21

Spatial Data Service


ASP.NET REST-ful Service
Supports spatial and attribute queries

Copyright ESRI. All rights reserved.

This is provided in MapIt via the Spatial Data Service, an ASP. NET Web service that uses the lightweight REST format for client interaction. The service supports querying tables in a SQL Server instance, using either spatial or attribute filter.

Copyright 2009 ESRI. All rights reserved.

22

Spatial Data Service


ASP.NET REST-ful Service
Supports spatial and attribute queries

Connects to SQL Server 2008 using standard methods

Copyright ESRI. All rights reserved.

It connects to SQL server using standard methods and protocols. Some of these properties are visible, and can be managed within the Web services Web .config file. For instance, a Windows or SQL account is provided during installation and is used to connect to a named SQL Server instance. This information is encrypted in the Web .config. Note the account defined must have at least select permissions on a schema or table, or read permissions on the database in which you want to query content.

Copyright 2009 ESRI. All rights reserved.

23

Spatial Data Service


ASP.NET REST-ful Service
Supports spatial and attribute queries

Connects to SQL Server 2008 using standard methods Spatial Data Services Directory application
Simple browser-based application Browse databases, tables, and views Perform query operations Copy and paste URLs into clients

Copyright ESRI. All rights reserved.

The Spatial Data Service also provides a visual user interface in a browser to traverse and discover databases and tables, table metadata such as fields and primary keys, and allows you to initiate spatial attribute queries to return data. The URLs discovered using the services directory can be used by clients to consume spatial data exposed by the Spatial Data Service.

Copyright 2009 ESRI. All rights reserved.

24

Spatial Data Service


ASP.NET REST-ful Service
Supports spatial and attribute queries

Connects to SQL Server 2008 using standard methods Spatial Data Services Directory application
Simple browser-based application Browse databases, tables, and views Perform query operations Copy and paste URLs into clients

Support Projection on the Fly


Any standard WKID (from/to)

Copyright ESRI. All rights reserved.

As part of the query operation on tables, the Spatial Data Service also supports changing the spatial reference on the fly. This means you can define a well-known ID, or WKID, for a spatial reference of your choice to align the results of the query to other layers in your client application.

Copyright 2009 ESRI. All rights reserved.

25

Software demonstration

Copyright ESRI. All rights reserved.

So let's move on to the software demonstration for the Spatial Data Service. I'll go back to my machine where I have installed MapIt, and I'm going to navigate to the Spatial Data Service program menu item. A browser window will pop up and display the home page for the Spatial Data Services directory. The services directory is a set of databases available in the SQL Server instance that we're connecting to. Those databases we can click on and we can traverse the tables that they contain, in this case we're interested in the LmbrStores table that we recently geocoded addresses in and added a spatial column to. We can discover field metadata by clicking on the table, whether or not we have a primary key, the name of the field, and the fields that are contained within the table. Note there's a shape column of a specific SQL Server type, and it also contains the spatial reference ID, or the well-known ID, for this service geometry type. There's one supported operation, query. Query is what will be used by clients to interact with spatial data within SQL Server. On this page we can construct queries and see what results will return. In the Where clause, if I add a 1=1, this will return all features within the table. We scroll down to the bottom. What we'll see here is a comprehensive list essentially of results that were returned. We're just going to, by default, display the top 50 of those results. What we can see here is that the geometry is returned, in this case point geometry, with its coordinates and the spatial reference. I know we can project on the fly using Spatial Data
Copyright 2009 ESRI. All rights reserved.

26

Service, so you can enter another well-known ID, in this case, a well-known ID for Bing Maps or a Web Mercator projection. We'll initiate another query, and we'll see that the spatial component has changed. Note the data in the table in SQL Server instance has not changed. Merely the geometry as stored has been projected on-the-fly by the Spatial Data Service before being returned to the client. We can also, in the returned fields, be able to find all fields using an asterisk. This will give us a look at all fields as returned for each row within our table. We can also choose between HTML and JSON. HTML is really just designed for the services directory so that you can view the data more aesthetically. JSON is used for programmatic clients. We can see that content here. Note one thing that's very important about the services directory is the ability to retrieve the URL that a client will use to query our data, spatial data within SQL Server. This URL will come in handy in future sessions when we cover working with the Silverlight API as well as the ESRI Map Web Part. Note, by default, the Spatial Data Service is limited to returning a thousand records at a time. The Spatial Data Service admin can change this in the Web .config, or note that a client will be required to iterate from multiple queries to return more than a thousand records. Note there's also a help system included with the services directory. In this case, each page within the service directory has its own help content, and we can scroll down, we can see the different parameters that are provided via the REST for request, to a table within our SQL Server instance using the Spatial Data Service. One other item to note is that the Spatial Data Service leverages caching for improved performance. If you've recently upgraded or changed content of a database or a tables within SQL Server, you will likely need to refresh the Spatial Data Service cache. Note the convenient Refresh link which you click on in the services directory to refresh your content. Note in the next two sessions, we're going to cover using the Spatial Data Service and client applications and the services directory to consume and display spatial data stored in SQL Server.

Copyright 2009 ESRI. All rights reserved.

27

Review
Spatial Data Services enable you to View your SQL Server instance content Use REST to query tables in a SQL Server instance

Copyright ESRI. All rights reserved.

So to review the Spatial Data Service, it provides a gateway to spatial data, stored in SQL Server by, one, providing a services directory to traverse SQL server instance content and discover URLs; and two, providing a lightweight REST API to query tables and return results. You can modify the behavior of the Spatial Data Service such as record limits to cache mode in its Web .config. See the MapIt help for a complete list. You can also deploy multiple Spatial Data Service instances. Merely copy and paste the REST folder, included with the MapIt install, to a location of your choice, and then use the SDS config utility included with the product, on the command line, to set up the IIS Web application.

Copyright 2009 ESRI. All rights reserved.

28

Use your data

Copyright ESRI. All rights reserved.

Once your geographic data is prepared and loaded into SQL Server and served using the Spatial Data Service, you can construct a client to consume and display your spatial data on a map. Two client features are included with MapIt: the ArcGIS API for Microsoft Silverlight/WPF, and the ESRI Map Web Part for Microsoft SharePoint. First, we'll take a closer look at the ArcGIS API and build a Silverlight application.

Copyright 2009 ESRI. All rights reserved.

29

ArcGIS API for Microsoft Silverlight\WPF


Designed for the Silverlight and WPF Platform Create rich, interactive Web and desktop applications Integrate ArcGIS Server, MapIt, and Bing Maps

Copyright ESRI. All rights reserved.

The ArcGIS API for Microsoft Silverlight/WPF is designed for developers to create applications built on the Microsoft Silverlight or WPF platforms, both of which are integrated with Visual Studio 2008 and Visual Web Developer Express 2008. The API enables developers to create rich Internet and desktop applications that utilize the powerful mapping, geocoding, and geoprocessing capabilities provided by ArcGIS Server and Bing Map services. To use the API, simply reference the ArcGIS API for Microsoft Silverlight or WPF libraries included with MapIt, and start creating your Silverlight or WPF application using Visual Studio or Visual Web Developer.

Copyright 2009 ESRI. All rights reserved.

30

ArcGIS API for Microsoft Silverlight\WPF


Designed for the Silverlight and WPF Platform Create rich, interactive Web and desktop applications Integrate ArcGIS Server, MapIt, and Bing Maps Libraries
ESRI.ArcGIS.Client.dll Core library (map, layers, graphics...) ESRI.ArcGIS.Client.Bing.dll Support for Bing Maps services ESRI.ArcGIS.Client.Toolkit.dll Controls for working with the map

Copyright ESRI. All rights reserved.

The API is composed of three libraries. A core library, which contains the map control, layer support, graphics, geometry, and symbolization. The Bing library provides support for Bing Map services, such as map imagery, geocoding, and routing. And the toolkit, which provides a set of common controls to enhance the core components in your application, such the navigator, the magnifying glass, or a toolbar.

Copyright 2009 ESRI. All rights reserved.

31

ArcGIS API for Microsoft Silverlight\WPF


Designed for the Silverlight and WPF Platform Create rich, interactive Web and desktop applications Integrate ArcGIS Server, MapIt, and Bing Maps Libraries
ESRI.ArcGIS.Client.dll Core library (map, layers, graphics...) ESRI.ArcGIS.Client.Bing.dll Support for Bing Maps services ESRI.ArcGIS.Client.Toolkit.dll Controls for working with the map

Requirements
Visual Studio 2008 sp1
Express to Team Suite Microsoft .NET Framework 3.5 sp1

Silverlight tools for Visual Studio (add-on)

Copyright ESRI. All rights reserved.

To get started with using the ArcGIS API for Microsoft Silverlight/WPF, you'll need to install Visual Studio 2008 Service Pak 1, or Visual Web Developer 2008 Service Pak 1. Note both include the .NET Framework 3.5, but you'll need to install Service Pak 1 for the 3.5 framework, as well. You'll also need the Silverlight tools add-on for Visual Studio. More information on the Silverlight requirements is available at the Silverlight .NET Web site.

Copyright 2009 ESRI. All rights reserved.

32

Software demonstration

Copyright ESRI. All rights reserved.

On to the software demonstration. In this example, we use Visual Studio 2008. To create a new Silverlight application in Visual Studio, go to File > New project and select the Silverlight node under the language of your choice, C # or VB .NET. Then select the Silverlight application template. When you're prompted to create a page that hosts your Silverlight application, note that by default, browser security restrictions do not allow access to remote services when a file is loaded from the file system. Remote services include ArcGIS Server, Bing, and MapIt services, some of which will be used in this application. With this in mind, the page that contains the Silverlight application needs to be hosted and accessed via a Web server. Fortunately, Visual Studio includes an ASP .NET development server, which can be used. In this example, make sure the option to add a new ASP .NET Web project to the solution to host Silverlight remains selected. At this point, your Silverlight application and the Web host application will be created. By default, the Silverlight application includes a page .xaml, or XAML file, as a container for Silverlight controls. We'll only add markup to the XAML page in this demonstration. In Visual Studio, add our reference to the core library, ESRI.arcgis.client.dll.

Copyright 2009 ESRI. All rights reserved.

33

The library is located in the installation directory for MapIt under the client API folder. Note there is both the Silverlight and the WPF folder containing ArcGIS API assemblies compiled for either the Silverlight or WPF platform. In this case we're building a Silverlight application, so make sure you reference the assemblies within the Silverlight folder. Note that no controls will be available in the Visual Studio toolbox; instead I've added a set of pre-created XAML markup shortcuts that I'll use to create the application for this demonstration. First I'd like to add a set of references that I'll use while building the application. I want to remove the height and width so the Silverlight application will fill the browser window, then I'm going to add a set of references. These references most of which actually go to the assembly that I just added, ESRI.arcgis.client. This enables me now to use ArcGIS API Silverlight content with any application. Now, it's in the grid control that provides a layout. I'm going add a new map. I've given a unique name, and I've provided an extent. This is a geographic extent that includes the continental United States. There is also a layers collection defined here, and it contains a single base layer, an ArcGIS Online tiled map service, street map service, that contains precached tiles of roads, landmarks, and relief data. We're going to use this base layer to provide context and really an aesthetic backdrop for our data from MapIt. To use MapIt data, we need to access tables that the MapIt Spatial Data Service provides access to. Namely these tables contain geometry and attributes. A query from the client, in this case the Silverlight API which uses the Spatial Data Service, will return features, which can be rendered in the map. So in this case, I'm going use a convenient layer type provided by the Silverlight API named, FeatureLayer. A feature layer, component merely requires a URL from which to retrieve features. We can use the Spatial Data Service services directory to get the URL we need. In this case we're interested the LmbrStores locations we geocoded with the spatial data systems. Let's navigate out to the services directory, now to get to the table of interest, in this case, LmbrStores. You can copy and paste the URL directly from the browser into the URL properties for the feature layer, that you'd like to access. The feature layer itself includes a default renderer, so we don't need to specify one to see our MapIt table content. Let's see what it looks like. As the application starts, we'll see our basemap, our street map layer from ArcGIS Online, and the geocoded locations shown on top of the street map layer. Here we can see the locations, but we need to enhance the look and feel of these locations to provide more information to the user. In Silverlight, frequently a collection of resources is defined in XAML to be used by other visual elements on the page to define the visual content. In this case, I need to add some symbology and

Copyright 2009 ESRI. All rights reserved.

34

renderer resources that I can use for the remainder of the demonstration to change the look and feel for the rendering of the points that we're retrieving from MapIt. What I've added here is a single simple marker symbol that I can use to render points. I've got a group of marker symbols used to render points, all bundled within a class breaks renderer. The class breaks renderer allows me to find minimum/maximum values within which I want to use a defined symbol type. I've also defined the attribute on which I want to retrieve these values that I can apply these symbols. There's also a dictionary converter included here that will be used in a data binding scenario later in this exercise. What's important here is I want to be able to enhance the rendering of the data retrieved from my MapIt table for LmbrStores. So there's a renderer attribute on the feature layer by which I can reference a resource, in this case, a renderer resource. I'm interested in the class breaks renderer that I defined in the minimum/maximum values for my sales field. I'm going to reference this as a static resource, a resource that doesn't change at runtime. And I'm also going to add a set of output fields of interest to my feature layer. And the field that'll be used here is SALES, and the feature Im going to be using, COMPANYNAME, for demonstration later. Let's see how this looks. Okay. So we can see that the class breaks renderer and the different symbols for different values of scales are applied. As we zoom in, you can see that the points themselves start to separate a bit and we can see the difference between individual locations. Unfortunately, we don't get any attribute information, and at some scales, some of the points overlap one another, so it's difficult to tell just how many locations happen to be in a specific region. We can solve this with a cluster renderer, which is included with the ArcGIS Silverlight API. Let's define a cluster renderer. First I'm going to remove my class breaks renderer, and I've created a cluster renderer. I'm going to add that to the page and note here, the feature layer itself contains a clusterer property. The cluster itself can contain a flare cluster instance, which has a set of properties that we can define. But in general, the clustering itself actually identifies groups of points in a layer that are within a given cluster distance, or radius, in this case. The cluster distanced is dependent on scale at which the map is displayed. So as you zoom in, fewer points are clustered, and as you zoom out, more points are clustered. Clusters can be rendered in two ways, as a flare symbol and as a cluster symbol. With the cluster you can define how many points within a given radius in pixels will be clustered using a flare symbol. The flare symbol is merely an animated symbol that we'll see in a moment. In this case, the maximum flare count is 10. So anywhere between 10 and the maximum flare count will use a flare symbol. Anything greater than the maximum flare count will use a cluster symbol. Single features will be rendered using the feature symbol attribute on a feature layer. The single feature symbol I've defined in my resources, and I've given it a name, MyRedMarker symbol. I'll define that there. Let's go ahead and run it and see what it looks like. Okay. The geocoded locations now are clustered, based upon the definitions provided within our feature clusterer. Note as we hover over these cluster locations, which indicate the number of points

Copyright 2009 ESRI. All rights reserved.

35

within a specific defined radius, we have a flare symbol. And you can see the animation of the flare symbol as we hover over those points to show us the individual points themselves. Note here individual features are rendered using the simple symbol red marker symbol that we defined and the cluster symbol doesn't have any animated or interactivity at this point. If we zoom in, we change the map scale. We can see that clustering is recalculated based upon the current map scale and the radius is reapplied. And to enhance this application further, what would be nice is being able to provide maybe a pop-up, or additional information on individual points to give us attributes, or attribute information. These pop-ups that we're going to construct are called MapTips. So, within the feature layer, there's a MapTips property. I'm going to add a block of text here which contains a predefined MapTip. Now MapTips are merely containers for other Silverlight user interface containers, or other user interface elements. In this case, we have a grid with a set of StackPanels. Add some text blocks to display field values for features. Now data binding is used to associate a feature set as a source and the text blocks as a target within the binding scenario. To define as a property for our text, we're going to be binding to the data context, within the scope, which is the data context that applies to the feature layer. We're using my dictionary converter to convert between the feature set, which is a dictionary, and we're using a converter parameter which in this case happens to be a field name within that dictionary that is our feature set. We're defining company name, city, and sales, all of these will show up within the container that we define for a MapTip upon hover of the feature at runtime. Let's see how this looks. Now when we hover over a feature, we can see individual pop-ups or MapTips display with attribute information associated with that point. As we zoom in, clusters are recalculated, and we still have the pop-up values.

Copyright 2009 ESRI. All rights reserved.

36

Review
ArcGIS API for Microsoft Silverlight/WPF Lightweight yet powerful client API Add MapIt tables as operational layers
Graphics or feature layers Define rendering, symbology, clustering, Map Tips

Copyright ESRI. All rights reserved.

So weve completed building our Silverlight application and showed how to integrate geographic data, prepared and served using MapIt components. As we've seen, the Silverlight/WPF API is truly a lightweight yet powerful service client. Spatial data accessed by the MapIt Spatial Data Service can be consumed and rendered as graphic features in a map. The feature layer provides a convenient means by which we can reference the URL that contains, or that queries, spatial data within SQL Server using the Spatial Data Service. Enhanced feature functionality, contained by the Silverlight WPF/API, allows us to apply a broad range of thematic rendering, clustering, and MapTips capabilities.

Copyright 2009 ESRI. All rights reserved.

37

MapIt for Microsoft SharePoint


Prepackaged ESRI Web part Build using the ArcGIS API for Microsoft Silverlight

Copyright ESRI. All rights reserved.

The other client included with MapIt is the ESRI Map Web Part for Microsoft SharePoint. The Map Web Part is not a developer component. Instead, it's a prepackaged, deployable Web Part configured within SharePoint. It's built using an ArcGIS API for Microsoft Silverlight, so it can take advantage of the rich interactive nature of a Silverlight application.

Copyright 2009 ESRI. All rights reserved.

38

MapIt for Microsoft SharePoint


Prepackaged ESRI Web part Build using the ArcGIS API for Microsoft Silverlight Includes:
Automated deployment package Simple administrative interface for configuring map Choose from an ArcGIS Online or Bing Maps basemap Add SharePoint lists, ArcGIS Server map service layers, or ESRI MapIt tables directly to the map Define symbology, custom class break, unique value renderers

Copyright ESRI. All rights reserved.

The Map Web Part feature includes a SharePoint deployment package and a command line utility to install the part on a SharePoint site. Once installed, the part provides an administrative interface to a Web Part editor who wants to configure the Map Web Part content. You can use an ArcGIS Online or a Bing Maps layer as a basemap. You can add feature data as operational layers from SharePoint lists and feature layers in ArcGIS Server Map Services or, as we'll show in this session, MapIt tables. The configuration of the Map Web Part exposes the ability to modify these operational layers and change properties, such as transparency, we can define filter definitions, add pop-ups with alias fields, and construct renderers on the fly.

Copyright 2009 ESRI. All rights reserved.

39

MapIt for Microsoft SharePoint


Prepackaged ESRI Web part Build using the ArcGIS API for Microsoft Silverlight Includes:
Automated deployment package Simple administrative interface for configuring map Choose from an ArcGIS Online or Bing Maps basemap Add SharePoint lists, ArcGIS Server map service layers, or ESRI MapIt tables directly to the map Define symbology, custom class break, unique value renderers

Requirements:
Microsoft Office SharePoint Server (MOSS) 2007
Enabled with Microsoft .NET Framework 3.5 sp1 Standard or Enterprise level

Copyright ESRI. All rights reserved.

The Web Part itself requires Microsoft Office SharePoint ServerMOSS2007, enabled with the .NET framework version 3.5 Service Pak 1. We can use this on either Windows Server 2003 or 2008, and it's supported on the standard and enterprise level both in 32- and 64-bit OSs.

Copyright 2009 ESRI. All rights reserved.

40

Software demonstration

Copyright ESRI. All rights reserved.

So in this demonstration I'll go through deploying the Web Part, configuring within SharePoint, and getting the results. I'll navigate back to the machine on which I've installed MapIt. Within the MapIt install location there is a SharePoint folder. The SharePoint folder contains a couple of files of interest. There's a Windows SharePoint solution, which contains the part, we also have a SP config utility, mainline utility, that we can use to install and uninstall the part onto a the SharePoint site. There's also a help file, which is accessible via the program menu, which will assist you in deploying, using, and configuring the part. In this case what I'd like to do is deploy the part on a Web application that I've hosted on this machine. If I navigate out to a command prompt and go to the SharePoint folder in the MapIt install location, I can specify the SP config utility in the command line. If I specify without parameters, I get a set of help information on the different parameters that are permitted when using this utility. I'm interested in installing the ESRI Map Web Part onto a Web application that I've hosted on this machine named Sedona. Now the Web application itself may contain, and does contain, multiple site collections. We get instant feedback on the deployment process. The part will be installed and activated on each site collection. So in the browser, I'll navigate to the Web application that contains a site collection named DemoSiteCollection that I've created for this demonstration. There's a document collection that contains a demonstration page, a Web Part page that I can add Web
Copyright 2009 ESRI. All rights reserved.

41

Parts to. I open this page, navigate to site actions, and click Edit page. This enables me to put in the Add a Web Part and navigate using the Add Web Parts dialog to the ESRI category, and check the box next to ESRI Map Web Part. This will add the Web Part to the page. We can see by default that the map is centered on the continental United States. It's using an ArcGIS Online layer and includes a collection of layers from ArcGIS Online. I can choose between streets, which is the default, topography, or imagery. Note since it's based on our Silverlight API, we have all of the rich interactive qualities of a Silverlight application at our fingertips. What I'd like to do now is start configuring the Web Part so I can add operational layers. I'll select the edit/modify shared Web Part option. What I'm also want to do is get myself a little more real estate, so I'm going to change the size of the markup in the browser. What we can see in edit mode is a set of panels, one that allows me to set the basemap, and another one that allows me to define data sources and add operational layers. First I'll set the basemap. I have the option of using ArcGIS Online, which is the default, or Bing Maps production or staging. I have a Bing Maps production account. I'll enter those details here. As soon as I click OK, I get instant feedback. Note that my request is sent, and behind the scenes I can see that my map has switched to the Bing Maps roads layer. I click on the globe in the upper left-hand corner; I can shrink the configuration panels and view my map. Note Bing Maps, like ArcGIS online, has a layer collection that I can choose from. Roads is the default, but I can also choose aerial, imagery, or aerial imagery with labels. I'm going to stick with the roads layer. I'm going to reopen the configuration panels, shrink the basemap panel, and start working within my data source panel. By default, any SharePoint list within the current site collection that has geoenabled fields will show up. Well get back to this in a moment. First I'd like to add some common geographies that I've added to my SQL Server instance and I've made accessible via my Spatial Data Service. I'm going to navigate to the Spatial Data Service end point that I created earlier. We'll see the entry is tagged in the data source panel with Spatial Data Service. If I expand this panel, I can see a list of databases and tables within those databases. I'm interested in adding ZIP Codes and in this case, in the Mercator of projection, in the same projection as Bing Maps. Instantly, I'm brought to a configuration panel. This configuration panel enables me to set a variety of options, such as the display name that I'd like to show when users are consuming the Map Web Part in their layer list. So I'll change this to something a little more intuitive. I'm actually going to filter for ZIP Codes that are in the state of Oregon, and I'm also going to define population density in just a moment.

Copyright 2009 ESRI. All rights reserved.

42

For the filter expression, I just want to show those ZIP Codes that show up in Oregon, so I can specify a field name and a filter value. I'll click Apply, and hide the configuration tabs and zoom to the operational layer. By default, the symbology for the polygons are the areas that are stored and associated with my ZIP Codes in Oregon are given a default symbol. In addition, a set of pop-ups or MapTips is also configured and available upon each aerial polygon in a map. We can see all fields are included by default. If I select the pop-up tab in the configuration dialog, I can set specific fields that I'd like to show in the pop-up or the MapTip within the map. In this case I'd like to show ZIP, give it an alias name that will show up in the MapTip, and also specify population density. Once I enter the values, I'll note the layer's immediately updated. I'd also like to apply symbology to the map as it's displayed within the SharePoint Web Part. By default, a simple symbol for all features is set. I can use the color bar to define different colors, which are actively updated as I interact with the color selector. In this case, I'd like to apply a set of value ranges so I have the ability to create a thematic map with a set of class breaks. I also want to define a field on which to construct those class breaks. What you'll notice is when I specify the classify by field, it will give me a class breaks slider bar. By default, I'll have two class breaks. It will spread between the lowest and highest values within the field selected. In this case I want to add a couple ranges, so I'll add two ranges, and I'll specify the class break minimum and maximum values for those ranges. I can also interact with the slider bar to change the boundaries between the class breaks. If I need fine detail, I can select the class break, and I can define the value explicitly. In this case, I know a couple of class break values that I'd like to enter, and so I'll select a respective class break within the slider bar and modify them appropriately. What we can see on the map is that features are updated immediately. What I also get is a color ramp selector. So a set of predefined color ramps are created for me. I can define these explicitly if I'd like, or, for ease of use, I can select a color ramp and have it immediately applied, using the class breaks that I defined earlier. As soon as I click OK and accept the changes, the part will show a later collection which contains any layers or operational layers that I've added to our map. In this case, if I need to reconfigure that layer I can click on it again and open up the configuration panels that we saw before. I also have an Add Data button here that takes me back to my Data Source panel. This enables me to add additional information or additional operational layers to my map. As I mentioned before, we can add a SharePoint list data to a map. I have a set of SharePoint lists available in my site collection, one of which contains login sites, and in all items used created by default. If I select all items, I'm taken into configuration panels for the list. One item of note is that a SharePoint list can have address information or

Copyright 2009 ESRI. All rights reserved.

43

coordinates. Addresses need to be geocoded. Coordinates contain spatial information that enables list base data to be plotted on the map. I'm going to select two fields within the list and click the Locate button. In the map, immediately, those locations are plotted. I'd also like to find a more intuitive name for the Web Part end users. In addition, I want to set a couple of fields that they may find important such as latitude/longitude and site name. I can also define a more appropriate symbol for my points using an integrated symbol selector. When finished, I can click OK, and I go back to my configuration layer list. What I'd also like to do is to define the initial extent for the map. So when a user opens the Web Part for the first time in a page, he'll be viewing this extent. I'll close my configuration dialogs to get a better view. When finished editing, click OK or Apply to save the changes. We'll exit edit mode in the page, and we'll be able to view the part from the end user's perspective. They have the ability to interact with the features such as the SharePoint list data plotted on the map and other information, such as population density and ZIP Codes. In this case we can see that we have a set of login sites that happen to be located quite a distance away from most of the population centers within Oregon. Note the user also has the ability to change the base layer.

Copyright 2009 ESRI. All rights reserved.

44

Review
ESRI Map Web part for Microsoft SharePoint Simple yet powerful in-the-box solution Provides an effective visual interface for adding, configuring, and displaying MapIt layers

Copyright ESRI. All rights reserved.

So to review, the ESRI Map Web Part provides an easy-to-deploy and easy-to-configure map component for SharePoint sites. Coupled with the MapIt Spatial Data Assistant to prepare your spatial data, and the MapIt Spatial Data Service to expose your geographic data to a client, you can use the Map Web Part to effectively integrate SharePoint lists with geographic data in SQL Server, and present your results visually in a SharePoint portal solution.

Copyright 2009 ESRI. All rights reserved.

45

For more information


Online resource site: http://www.esri.com/mapit Access to MapIt product information, web help, developer documentation, forums, and knowledge base articles

Copyright ESRI. All rights reserved.

Before I go, I'd like to point you to the MapIt Web site for additional information: www.esri.com/mapit. The site contains links to try and buy the MapIt product, marketing details, and help resources such as product documentation, forms, and blog content. For more information on this resource, just click the What's next link in the left portion of your browser. Your comments help us improve our seminars. Please take a moment to complete our survey. Just click on the evaluation link to take the survey. I hope you enjoyed the seminar. On behalf of ESRI, I'd like to thank you for watching this presentation.

Copyright 2009 ESRI. All rights reserved.

46

You might also like