32
ArcGIS Server Development using Adobe Flex, Javascript and Silverlight: A Side-by- Side Comparison Justin Conner, Wood County Jennifer Reek, City of Brookfield Melissa Mann, UW-Milwaukee

Wednesday Workshop - ArcGIS Server Development using Adobe Flex and Javascript: A Side-by-Side Comparison

Embed Size (px)

Citation preview

ArcGIS Server Development using Adobe Flex, Javascript and Silverlight:

A Side-by-Side Comparison Justin Conner, Wood County

Jennifer Reek, City of Brookfield Melissa Mann, UW-Milwaukee

Flex Is Dead!!!

• In a word…. No!•Adobe Announcement

•As of November 2011, Adobe is in the process of preparing two proposals for incubating Flex SDK and BlazeDS at the Apache Software Foundation.•Following this announcement, Adobe will no longer be the owner of the ongoing roadmap. Instead, the project will be in Apache and governed according to its well-established community rules. In this model, Apache community members will provide project leadership.•Adobe will continue to support applications built with Flex, as well as all future versions of the SDK running in PC browsers with Adobe Flash Player and as mobile apps with Adobe AIR indefinitely on Apple iOS, Google Android and RIM BlackBerry Tablet OS.•Our announcements relating to changes in the way Flex SDK is developed do not change the fundamental value-add of Flex or make HTML5 suddenly more capable than it was previously

Flex Is Dead!!!

•ESRI Developers Response•Adobe recently announced the discontinuation of support for Flash Player in mobile device browsers, however there is continuing commitment and development for Flash Player for browsers on desktops.

•Outside the mobile space, Adobe continues playing a major role. We’re committed to supporting Flash/Flex for the foreseeable future as many of our customers have successful deployments using it.

•Esri has always focused on computing and development platforms that are viable and demanded by our customers, and that focus has not changed. We have strong strategic alliances with organizations like Microsoft, Adobe, W3C, and others to ensure we are technically aligned and participating in the future directions of technology.

Flex Is Dead!!!

•Blogger Responses•Georelated.com

•James Fee – Spatially Adjusted

•ESRI Forums

Flex Is Not Dead!!!

So are you ready to make a website?

• Web Server

•Access to REST Services

•Download Sample Flex Viewer

•Optionally, install Notepad ++

ArcGIS API for Silverlight

Getting Started – What do you need?•Microsoft Visual Studio 2010 or Visual Web Developer 2010 Express•Silverlight 4 Toolkit•Expression Blend SDK for Silverlight 4•Microsoft .NET Framework Version 4•Download and install the ArcGIS API for Silverlight

ArcGIS API for Silverlight

Installation Requirements

ArcGIS ViewerSilverlight application builder is easy to use. ESRI has developed a step by step setup and modification environment to add your basemap, operational layers, tools, colors, title, layout, links and more without writing code!

How to get into the BuilderI downloaded and installed the ArcGIS Viewer. Follow instructions for setup. You may need IT to assist with installation.

Create a new applicationTo create a new application use new map.

Getting Started is your friend.First, set your basemap. You can use your cached services as well. For Brookfield I have added to my selections 2010 Aerial, City Map, and 2005 Topo.

Adding Operational LayersMake sure you are toggled to the Map tab.To add an operational layer, browse to your server. We will be looking for services that are not cached so that we can build a tool to query the parcel information. I will add TaxParcel from odin.

Configure TaxParcel layerClick to configure your layer. Now you will be able to set a symbol (in red), pop up information from the attribute file, and return fields from the attribute table. Select the parcels using the select button. Here I am configuring the pop up information.

Example of attributes returned from a selectThis is called a data grid where the attributes are returned. The toggle buttons will return the entire set within the cached area or just the highlighted. The selected attributes can be exported from the data grid to a .csv file to be used in Excel.To add other tools, use the Tools tab.

Customize the Logo and TitleToggle to the Legend. Here I can add my logo and change the title of my application.

Deploy the applicationsClick Deploy in the upper right. Give your application a name and description. You now have your first application.

New application viewed from Firefox

Interactive SDK samplesGood information and a great place to started to add other tools to an application. Research and find more tools to use through this site. Check out the Forums and Blogs. If you have a problem, someone else most likely has dealt with the problem as well.

Using a Sample Viewer with Existing WidgetsThis sample viewer was shared and I choose it to try to replicate what City staff is custom to using through the old ArcIMS site. This site uses an application with widgets that you can simply modify using Microsoft Visual Studio 2010 or Visual Web Developer 2010 Express.

City of Brookfield Mapping Application Layers and ToolsThe sample viewer provided all these widgets, just what I needed for City staff. Upper right are my basemaps. Map Content has my operational layers. Toolbar at the top are the Tools (widgets) to be configured.

City of Brookfield Internal SiteDemo

Configuring the application page and the widgets.

AppConfg.xmlThis is the main page to set up the basemaps, operational layers, what widgets to use and the look of the site. There are several looks, they call these Skins.

ArcGIS ServicesI like using ArcCatolog to work with the services. These are using an ArcMap document so you will spend time refining the maps to get the data in the way that you will need it in the services. Cached basemaps will not reflect the changes, you need to rebuild the cache to see them. Operational layers or dynamic layers, are not cached and do not need to be rebuilt.

Using REST and knowing your servicesThis is my TaxParcel Layer information. It is a Feature Layer. The ID: 0 which means that it is my first layer in the .mxd. This shows me the field names that I will need in my query. Also, I have a Definition Expression: even though I have areas out-side of the city boundary, I have defined to only return data within the city.

Example of the Query WidgetWithin the widget, I configured the Parcel layer from my map service and what attribute to be queried. In this example, I queried the last name (PONTO), the application highlights the parcel and I can retrieve the parcel information.

Configuring the QueryWidget.xmlThis is how I define what Layer to query, query fields, output fields, output labels and the map tip. Notice that the layer has a layer define as the http://odin/ArcGIS/rest/services/TaxParcel2/MapServer/0.

Search Nearby ToolOnce I have selected the parcel, I can do a 300’ buffer using the Search Nearby Tool (widget).

SearchNearby.xmlThis widget is the 300 foot buffer. Be aware that you need to define the projectWKID “32054” since I am using a geometry service online. Then you define the Search Layer similarly to the QueryWidget.xml.

Query by Drawing Pick your layer to query from and the type of draw type. Returns the features and attributes. The layers to select from and data to return were set up in the QueryWidget.xml.

Code for both types of queriesNotice the rest endpoint is to the Sanitary map service, layer 1

Show the Identify Widget to return Water Valve Information and link to the water valve cards

Jennifer Reek – City of Brookfield, WIContact Information:[email protected]

Thank you!

AnyQuestions or Comments?