Monthly Archives: July 2011

Using ArcGIS Online Maps with ArcGIS Viewer for Flex

The ArcGIS Viewer for Flex version 2.4 was recently released with some great new features that include a geoprocessing widget, support for many different languages, and more. These features build upon the already easy-to-configure Flex viewer capabilities that can be used with any ArcGIS Online webmap. Let’s have a look at how you can use your ArcGIS Online maps with the configurable ArcGIS Viewer for Flex application.

To get started with the ArcGIS Viewer for Flex you’ll need to do two things; setup your environment to host the application, and download and install the ready-to-use Flex viewer. Both are simple to do, and covered in the Getting Started help topic. Once installed you can use your own ArcGIS Online maps, or any other publicly shared ArcGIS Online maps, in the Flex viewer with a few simple edits.

Below we’ve opened the USA Tapestry Segmentation map currently featured in the ArcGIS Online gallery using the built-in ArcGIS.com map viewer (a JavaScript application): 

When you open any map you’ll see that the URL includes the unique map ID, which we’ll use in the Flex viewer. Here’s the ID highlighted in the map URL:

The ArcGIS Viewer for Flex uses XML configuration files to control everything from the map that will be used to the widgets that are displayed and how they work. To add your ArcGIS Online map, go to the root folder where you installed the Flex viewer application (for example – c:/inetpub/wwwroot/flexviewer) and edit the config.xml file found there. Near the top, in the UI elements section, you’ll see the map tag:

Comment out the existing map tag line (or edit it) to add your map ID (in the config.xml file it is named ”itemid”) to the list of parameters, as shown below:

 

Now you can start the viewer from your local server (for example: http://localhost/flexviewer) and you’ll see the ArcGIS Online webmap displayed. Note that pop-ups, transparency, map notes, and other features in your ArcGIS Online map are fully supported.

The viewer can be customized easily, without the need to do any programming. You can remove widgets by commenting out the ones you don’t want; you will find them listed at the bottom of the config.xml file. You can also modify the properties of each widget (found in the widgets folder of your installation) by editing their respective XML configuration files. All you need is Notepad (or similar editor) and you can quickly create a custom Flex application for your ArcGIS Online maps.

Those familiar with Flex can create and add your own custom widgets, and a lot more, via the Flex API. To deploy the finished application, just post it out on your web site.

For more information see the following:

ArcGIS Viewer for Flex: A Quick Introduction (video)

Getting Started with ArcGIS Viewer for Flex

Posted in ArcGIS Online, Services | Tagged , , | Leave a comment

Voting on a new park location

Park analysis and design:  Voting on a new park location (part 3)

In my previous blog post, I determined suitable locations for a new park by analyzing a series of datasets provided by the City of Redlands. The final output showed a number of parcels that matched the standards established in the model. The next task is to seek feedback from the public. To do this, I’ll take advantage of a web application I developed using ArcGIS Server.

Preparing the data
The park suitability model resulted in an output of a feature class containing many multipart features. A multipart feature, as the name suggests, is a feature with multiple parts. Think of Hawaii as one feature (state) with multiple parts (islands). To break the suitable areas for parks into separate features, I’ll use a tool called Multipart To Singlepart.

With every parcel being its own feature, I can calculate the area for each potential site by creating a field and using Calculate Geometry in the attribute table. Once I have the area in acres, I need to convert all the polygons to points using the Feature to Point tool so I can represent each park as a point location in the web application.

The final dataset contains fields for the park’s area and an identification number, which I derived by copying the OBJECTID to a field called ParkID. This number is used to link the park feature to the voting results table, which also has a field for the ID named ParkIDVoted (so I can distinguish it in the Flex code).

Building the web service and application
I’m developing my application using the ArcGIS API for Flex, so I first check if there are any existing samples that I can use as a starting point to help me collect votes. I find the Editing a related table sample, which demonstrates a similar scenario that I can modify for the needs of my own project. This sample takes a set of incidents (stored as points) and allows the user to flag an incident as important. In the code, there’s a map service that holds the points, as well as a table to hold the results. In the geodatabase, these are linked using a relationship class. These datasets need to be in an ArcSDE geodatabase with feature access enabled to allow web editing. Accordingly, I can set up my data this way and publish it with ArcGIS Server, which makes the parks and the table become layers in a map service.

I need to change a few things in the sample to customize it for my own application: the URL of the parks layer and the URL of the table holding the votes. Some field names are different, but other than that, the logic of casting the vote is fairly straightforward.

In terms of the interface, the sample shows how to use the pop-up window (infoWindow) when a park is clicked. I used the same thumbs-up icon and added a bit more information to the information window. Additionally, I published the park access map and the final suitable parcels layers, which can be turned off and on in the application using simple Flex components.

Submitting a vote
When users find a park they are interested in, they click the icon on the map. This sends a query to the server using the x,y location of the map click, which also triggers a relationship query that gets the number of votes of the record in the related table. The infoWindow then displays the ID of the park that was clicked, the park size, and the total count of current records in the related table, which are votes in favor of this location.

To vote for this park, the user clicks the thumbs-up icon, which sends a message to the server (applyEdits) that puts the ID of the park, plus a value for “like” into the related table through the relationship class. The count is increased by one and the total vote count can be seen immediately.

Counting the results
On the server, the related table collects the votes. Each record in the table is a vote, which includes the Park ID the user clicked, an attribute for the vote (“true”), and the date of the vote.

When the voting period is over, I can run a summary on the final table using the Summary Statistics tool. This counts the number of records with the same ID and creates a table, which I can then build a report on using the new reporting tools in ArcGIS 10.

Now that I have a winner, the next task is to design the park using the sketching tools in ArcGIS 10. I will cover this in my next blog post.

Accessing the Data
The data, Flex source code, report template, and a few other parts of the workflow can be found here

The rest of the data and tools for this blog series can be found in the Park Analysis and Design group (make sure to filter by Show: All Content at the top of the page)

Content for the post from Matthew Baker

Update

Part 1 – Park analysis and design – Measuring access to parks

Part 2 – Park analysis and design: Locating a park through suitability analysis

Part 3 – Park analysis and design:  Voting on a new park location

Part 4 – Park analysis and design:  Sketching the design of a new park

Posted in Analysis & Geoprocessing, Editing, Web | Tagged , , , , , , , | Comments Off

ArcGIS Online World Topographic Map updates for July

The ArcGIS Online World
Topographic Map
(World_Topo_Map) was recently updated with several more
contributions from the user community.

Wilson High School in Pottawattamie County, Iowa, at 1:2k 

The World Topographic Map includes new detailed, local content for several areas as well
as updated and expanded detailed, local content covering several cities
and regions in North America. These include:

  • Bernalillo County/Albuquerque, New Mexico
  • Kingston, Ontario, Canada
  • Pottawattamie County, Iowa
  • Regina, Saskatchewan, Canada
  • Westchester County, New York

In addition, the local content was updated for the following areas:

  • Baltimore, Maryland
  • Minneapolis, Minnesota

Updated data for Minneapolis, Minnesota at 1:2K
Many of these contributions were made through the Community Maps Program. For more
information visit the Community Maps Program website or view
the live map of current and forthcoming contributors.

If you have questions, please post them in the ArcGIS Online forums.

Posted in ArcGIS Online, Services | Tagged , , , , | Comments Off

ArcGIS Desktop 10.1 Beta 1

The beta 1 release of ArcGIS Desktop 10.1 is now available.  If you have pre-registered for the beta program you should have gotten an email with instructions on how to download the beta software.  If you have not yet joined the program go to the new ArcGIS Beta Community site and sign up today.

 

Posted in Uncategorized | Tagged , , , , , | 2 Comments

Beta 1 for ArcGIS 10.1

It’s beta 1 time for ArcGIS 10.1 if you have pre-registered for the beta program you should have gotten an email with instructions on how to download the beta software.  If you have not yet joined the program go to the new ArcGIS Beta Community site and sign up today.

 

Posted in Uncategorized | Tagged , , , , , , , | 1 Comment

ArcGIS API for Flex and ArcGIS Viewer for Flex: Version 2.4 released

Versions 2.4 of both the ArcGIS API for Flex and ArcGIS Viewer for Flex were released today. Many improvements have been made, especially to the viewer, so take a careful look at What’s New in the API and What’s New in the Viewer. Here are the Top 10 new viewer and API highlights of the 2.4 releases:

ArcGIS Viewer for Flex 2.4

  1. New Geoprocessing widget that works with almost any geoprocessing task.Geoprocessing widget
  2. Clustering of points from feature layers. See layer tag.Clustering in the Flex Viewer
  3. You can configure a definition expression on sublayers within a layer of type=”dynamic” (an ArcGIS Dynamic map Service). See layer tag.
  4. You can set a widget size in the configuration file.
  5. KML layers introduced. The <layer> tag supports type=”kml”.
  6. Support for four new locales has been added: Arabic, Brazilian Portuguese, Italian and Russian. This is in addition to the existing locales of Chinese, English, French, German, Japanese, and Spanish.Arabic bookmark widget
  7. The initial “view” of the Search and Locate widget can be set in the widget configuration file.
  8. Improved compatibility with Adobe Flex 4.5 SDK.
  9. Widgets can be centered using new verticalcenter and horizontalcenter.
  10. Bug fixes:
    • Color of hyperlinks in popup windows remain the same even after clicking the link
    • Multiple bug fixes related to widget layout locations and run-away widgets. Widgets can be place anywhere even when the overview map widget is open. Floating and vertical layouts don’t experience run-away widgets.
    • Overview map widget can be placed in any corner

For the full list of viewer enhancements, view the What’s new in 2.4 help topic.

ArcGIS API for Flex 2.4

  1. KML Layer gives easy access to data in KML format.
  2. Support for four new locales has been added: Arabic, Brazilian Portuguese, Italian and Russian. This is in addition to the existing locales of Chinese, English, French, German, Japanese, and Spanish.
  3. Improved support for mobile and touch-aware applications:
    • Improved pinch with interactive resizing.
    • New spark-based slider for the Navigation zoom slider.
    • No pan cursor if device doesn’t support a cursor.
  4. Improved compatibility with Adobe Flex 4.5 and 4.5.1 SDK.
  5. Improved clustering with the cluster symbol size able to be changed based on the number of features in each cluster.
  6. Expanded WMS functionality.
  7. InfoWindow fires an OPEN event when opened.
  8. Bug fixes for dates in the AttributeInspector.
  9. Bug fixes for Editor related to eliminating unnecessary requests.
  10. Bug fix for file sizes with the AttachmentInspector.

View the What’s new help topic on the ArcGIS API for Flex resource center for full details.

Contributed by Bjorn Svensson of the ArcGIS API for Flex development team

Posted in Services | Tagged , , | 5 Comments

Drag-and-Drop Questions and Answers

Just a couple of weeks ago ArcGIS Online webmaps and apps were updated to support adding spreadsheets (CSV files), text files, GPX files, and shapefiles (and much more in the July and August updates). Since then we’ve had a number of questions specifically about the support for these data types and drag-and-drop, and here’s a list of the common ones that we’ve been asked, along with their answers.

Q: I noticed drag-and-drop doesn’t seem to work for me, what’s up with that?

A: Drag-and-drop is not supported by all browsers. For example, Internet Explorer currently does not support drag-and-drop of files, but Chrome and Firefox do. For you geeks, it’s the File API that is used to manage drag-and-drop in the applications, and caniuse.com publishes the complete list of browser support.

Q. ArcGIS Explorer Online does not seem to support KML, will it ever?

A. As much as possible we try to keep the supported common features in the webmap seamless across the ArcGIS.com map viewer and Explorer Online, but this isn’t always possible. KML will supported in Explorer Online is a forthcoming update.

Q. What happens when I add a CSV or shapefile?

A. When you import a CSV or shapefile the features in the source become features in a feature layer in your map. They’re saved with the map, and can be viewed by anyone you share your map with. 

Q. How many features can I add?

A. There is a 1000 feature limit, though depending on the source data and other factors (like which browser you use) you will find the practical limit to be a little more, or less, and your import mileage may vary. For example, you can easily add 1000 points from a spreadsheet and expect good performance using Chrome or Firefox. But depending on the complexity of polygons in a shapefile (number of vertices, etc.)

Posted in ArcGIS Online, Services | Tagged , , , , | Leave a comment

Tutorial on Iterators in ModelBuilder

Shitij Mehta has uploaded a tutorial on working with Iterators in ModelBuilder.  Click here to download the tutorial.

Posted in Analysis & Geoprocessing | Tagged , , , | 2 Comments

Boundary Generation & Geo-statistics

Recently we have received a lot of questions on the topic of boundary management, more specifically on the topic of boundary generation. This usually boils down to a question like:

“How do i generate serving area or node boundaries from customer, node or modem ID point data?”.

This problem initially sounds trivial but can be complicated by various factors:

  1. The point data contains erroneous data where the point ID was incorrectly coded, entered wrongly or changed at some point.
  2. The generated polygons must follow existing boundaries and adhere to various rules (follow tracts, dont cross rivers or railroads…)

This blog entry talks to this first issue, generation of polygons excluding erroneous data.

First an example… Say we have the following points representing customer or modem locations. These points all have the same ID on them. We want to derive a polygon from this set of data. As we can see there are several extraneous points to the north and south that appear to be invalid data.

Continue reading

Posted in Telecommunications | Tagged | Leave a comment

UC2011 Intro to the Geodatabase slides

As promised, here are the slides from the presentation Colin and I gave at the user conference this year.

I’ll get some more presentations up later this week too.

Enjoy!

Posted in Geodata | Tagged , , , | Leave a comment