Posts Tagged ‘Flash’

Yahoo! Geo Technologies

Monday, June 22nd, 2009

[Editor’s note: Yahoo! provides advanced mapping capabilities including GeoPlanet, a Web 2.0 gazetteer of world placenames (see also GeoName’s post on the relational ontology / the semantic web).]

Republished from Yahoo!

Yahoo! wants to connect the Web to the World; here you can access our increasing portfolio of platforms to help you geo-enrich your applications and make the Internet more location-aware:

GeoPlanet™: Provides the geographic developer community with the vocabulary and grammar to describe the world’s geography in an unequivocal, permanent, and language-neutral manner. (Blog post)

GeoPlanet Data: Tab-delineated files containing WOEIDs and the corresponding place-names that underlie GeoPlanet.

Placemaker™: Identify, disambiguate, and ‘extract’ places from unstructured and structured textual content to help create local- and location-aware applications. (Blog post)

Fire Eagle™: Allows users to share their location with sites and services through the Web or a mobile device.

Maps: Embed rich and interactive maps into your web and desktop applications.

Visualization: Geomap (Google)

Friday, June 19th, 2009

geomapgooglevisualization

[Editor's note: Google has made freely available the curious choropleth (colors by country) and graduated symbol (bubble) maps found in their Google Analytics tools as part of their charting - visualization kit. You set-up a HTML JavaScript object with the map parameters (country-value pairs or city-value pairs) and the colors and Google will make you an interactive Flash map (data brushing reveals country value on mouseOver) color coded via uninformative class breaks and terrible cartography linework (look at the US, Canada border) and a terrible world map projection (cylindrical with gross distortions in the higher latitudes). But it is free and fast and several regional base map are also available. There is certainly an oportunity for someone else to come up with a better API that uses the same function calls but draws better maps with meaningful data classes. Screenshot above is static, click on it to go to interactive version.]

Republished from Google Visualization.

Overview: A geomap is a map of a country, continent, or region map, with colors and values assigned to specific regions. Values are displayed as a color scale, and you can specify optional hovertext for regions. The map is rendered in the browser using an embedded Flash player. Note that the map is not scrollable or draggable, but can be configured to allow zooming.

We have two examples here: one that uses the regions display style, and another that uses the markers display style.

Regions Example

The regions style fills entire regions (typically countries) with colors corresponding to the values that you assign. Specify the regions style by assigning options['dataMode'] = ‘regions’ in your code.

Markers Example

The “markers” style displays a circle, sized and colored to indicate a value, over the regions that you specify. To use markers, you must include the following Google Maps API script with a key, unless you specify locations using latitude and longitude values.

Continue reading at Google . . .

PatchPanel: Flash Panels for Multiple CS Applications (Adobe)

Thursday, June 18th, 2009

adobedevconnection

[Editor's Note: ]

Republished from Adobe Developer Connection.

By Dr. Woohoo @ blog.drwoohoo.com.

Follow along with this tutorial to expand on what we created in the previous tutorial, PatchPanel: Integrating your ExtendScript, with the objective of using a framework that embraces running our Flash plug-in in multiple Creative Suite applications (Photoshop and Illustrator). When we are done, our Flash plug-in will work in all three CS applications using code that is appropriate for each host application― keeping in mind that this is necessary due to the differences in the DOMs of each application.

Our Flash plug-in will get the RGB values of the foreground color of the host CS4 application. You will integrate a separate ActionScript file for each host application within the Flash plug-in that you develop within a Flex Builder MXML project using the PatchPanel SWC library as the mechanism for communicating between your SWF and the host application, which will dynamically be defined in this example.

After completing this tutorial, you should be able to:

  • Add the Adobe PatchPanel SWC library, cs4.swc, to your Flex Builder Project
  • Import the host CS applications ExtendScript DOM
  • Copy your ExtendScript code from ExtendScript Toolkit to Flex Builder
  • Know what the appropriate color object structure is within the DOM of the three possible host applications
  • Install the SWF and accompanying JSX/JS file so that it is accessible from within Photoshop and Illustrator

Continue reading at Adobe Developer Connection . . .

Shapefiles, Actionscript 3.0, and Google Maps (Box Shaped World)

Monday, June 8th, 2009

[Editor's note: Tutorial for using the vanrikom classes to read in shapefiles in Flash and Flex AS3 and display them on a Google Maps mashup.]

Republished from the Box Shaped World blog. 28 April 2009.

I’m working an Adobe AIR application and I wanted to be able to have the user select a shapefile, and then parse it to create a KML file.  I didn’t want to have the user be responsible for creating a KML file.  I thought I might try and crack the shapefile enigma since it is a well documented format, but that would have taken time and I suddenly realized I’m not actually a developer :).  Instead, I found this set of Actionscript Classes to parse a shapefile in Flash.  Unfortunately, I didn’t find a very good tutorial on how to work with the classes.  The example is a little confusing (at least for me) and also uses a far file.  I’d never heard of far compressed files.  So I took the classes and created my own parser.  I thought I would post a tutorial on how to use these shapefile classes in conjunction with AIR and the Google Maps API for flash.  This technique would work with flex as well, I just didn’t want to have to write the code to upload a file.  I presume a few things with this.  The shapefile you are using for this should already have a geographic projection (e.g. latitude and longitude Geographic NAD 83).  In order to use the Google Maps API with AIR, you need a URL with a key associated with it.  Below are two zipfiles available for download.  The testfile.zip is the shapefile I was using.  The vanrikom.zip is the downloaded actionscript classes from the Google Code repository.  I had trouble downloading the using an svn so I did it manually.  I’ll save you the time by making it available here…unless the original author asks me to remove them.  There are parts that I find confusing with the way the reader was set up.  For some reason polyline inherits from polygon.  Intuitively to me it should be the other way around…but like I said, I’m not a developer.

This was all done using FlashDevelop and the Flex SDK 3.  There are 4 custom classes in addition to the mxml file.  Each are shown here.

Continue reading at Box Shaped World . . .

Mapping Foreclosures in the New York Region (NY Times)

Wednesday, June 3rd, 2009

[Editor’s note: The interactive Google Maps mashup in Flash AS3 from the New  York times shows vector overlay of choropleth mapping by census tract and at the street level via dot distribution. As the user zooms in, the dots are revealed, as is a street map. At all levels the census tract summary statistics are available with a mouse over. Zooms are preset for some areas, and the user can type in their own address to zoom to that area. Multiple years add time dimension. Spatial brushing on the map is accomplished by outlining the geography’s stroke, not changing the fill color. Thanks Laris!]

Republished from the New York Times. May 15, 2009

A New York Times analysis found that foreclosure rates in the region were highest in areas with high minority populations. Zoom in to see foreclosures at the street level. Screenshot below.

Interact with the original at New York Times . . .

nytimes_foreclosures_map_3

nytimes_foreclosures_map_2

nytimes_foreclosures_map_1

INTERACTIVE GRAPHIC: The Post 200 Database (Kelso via Wash Post)

Wednesday, May 13th, 2009

gr2009051202461

[Editor’s note: Uses the Flare visualization API in Flash ActionScript 3 to display data about the Post 200 companies in a treemap format. A vexing and il-documented API, but powerful. We considered showing the data with a graduated circle map but the company locations were too clustered for that to be effective.]

Republished from The Washington Post.
13 May 2009. By Nathaniel Vaughn Kelso and Terri Rupar – The Washington Post

Use our interactive graphic to explore data — including revenue and employment — for the top companies in the Washington area.

Boxes represent individual companies grouped together by sector, size based on data.

View the interactive version at The Washington Post . . .

post200interactive

Newsmap 2.0: Google News Treemap Visualization

Monday, May 11th, 2009

[Editor's note: A new version of the venerable NewsMap app, the Google News treemap visualization. Refreshed for it's 5 year birthday.]

Republished from Newsmap.jp.

Background: Newsmap is an application that visually reflects the constantly changing landscape of the Google News news aggregator. A treemap visualization algorithm helps display the enormous amount of information gathered by the aggregator. Treemaps are traditionally space-constrained visualizations of information. Newsmap’s objective takes that goal a step further and provides a tool to divide information into quickly recognizable bands which, when presented together, reveal underlying patterns in news reporting across cultures and within news segments in constant change around the globe.

Long time overdue, here comes newsmap 2.0

The new url is at http://newsmap.jp
Still working on a couple of bugs and really trying to push some features I still think as essential.

Before:

After:

New in 2.0 is:

  • rectangularized treemap layout: To accommodate text properly, cells are as rectangular as possible, this there’s more room for headlines without chopping them off in several lines.
  • search as you type: try the new search on the top right, see how newsmap updates.
  • deep linking: you can now deep link to any state of the app. just try updating your view, and notice how the url changes. You can grab and share that url with anyone.

More to come:

  • custom tabs: save your search query as a new tab
  • custom feeds: add your own RSS feeds to the map
  • stats: learn more about your news and how you consume them!

And much, much more!

A Magic Wand for Selecting Text in Adobe Illustrator (KELSO)

Wednesday, May 6th, 2009

[Editor's note: The beta expired so this is purely an extension of the testing period. No new feature.]

I have been developing a plugin / script for Adobe Illustrator to make it easier to select type in Illustrator by  attributes like font family, style, size, and fill color. I hope to release this as a commercial plugin for designers and cartographers late 2009? If you would like to beta test this plugin for me, please send me an email at nathaniel@kelsocartography.com or…

Download version 11d of Find and Replace Fonts Script (1.6m). Good thru summer 2009.

More information on this script available in this March 2009 post.

Instance_setMcName Flash Script + MaPublisher = Flash Interactive Thematic Mapping (Kelso)

Wednesday, April 29th, 2009

charlestonelectionresults

[Editor's note: Making the GIS > Illustrator > Flash workflow a 30 minute process instead of a 30 hour slog. Thanks Sebastian!]

Ken Hawkins, formerly of The Post and Courier newspaper (Charleston, SC) helped me figure out how to take GIS shapefile data (point, line, and polygon) prepped in ArcMap or similar, process it in Illustrator using the Avenza MaPublisher plugin, and then copy-paste import into Flash CS3+ and apply the Instance_setMcName script. I first saw his handywork in the http://www.charleston.net/graphics/200802_primary/ map which is illustrated at the top of this post. I first learned of this technique last year but I think it is still relevant so am posting it now.

Ken had help from Len De Groot over at newsartists.orghttp://www.newsartists.org/forums/showthread.php?p=41780, registration required). I have reformatted and edited Ken and Len’s instructions below.

Requirements:
  • A shapefile,
  • Illustrator CS3,
  • MaPublisher (Illustrator plugin),
  • Flash CS3, and
  • Free command script called “Instance_setMcName”. Before you start, download the script from Adobe, registration required (alternate download, no registration required) and double click file icon to install the script into Flash. Relaunch Flash to enable the script.

Overview:

  • Shapefile prep work in ArcMap GIS as needed.
  • Import the shapefile (.shp) in Illustrator using MaPublisher. Each geographic feature imports as it’s own path object in illustrator, visible in the Layers panel when it is set to not just show top level layers.
  • Use MaPublisher to name each map object’s GIS database attribute to name itself.
  • Import the Illustrator file to Flash .
  • Run the script to take the movieclip names and apply them to instances.

Detailed Workflow:

  1. Shapefile prep work in ArcMap as needed.
  2. Open your GIS shapefile in Illustrator via the MaPublisher plugin (File > Import Map Data).
  3. Edit > Select All the imported map path objects.
  4. Open the MapAttributes panel by going to View > MaPublisher > MapAttributes.
  5. In your MapAttributes panel, use the flyout menu to select Edit Schema.
  6. Select the #Name (usually selected by default) in the list of columns.
  7. Check the box marked “Derive value from expression”
  8. Click the “…” button.
  9. In the resulting dialog’s text entry field, type in the name of the field you want to use to name the individual polygons (county, precinct, etc.). This is case sensitive.
  10. Hit OK twice.
  11. Watch as your individual path objects are named in the Layers panel then save the file.
  12. Open Flash and import the AI file to the stage (File > Import).
  13. In the Import dialog box, select all the sublayers and check the box named “Create movie clip” and hit OK. The map will be imported both onto the stage and each map object will be added to the document’s Library.
  14. In the Library panel, select all the MovieClips in the Illustrator Import sub-folder and drag them up and out of the folders to the top level.
  15. Use Edit > Select All to select all your map object symbols on the stage.
  16. Under “Commands” in the top menu, select “Instance_setMcName.”
  17. All you symbol instances will be named the same as their parent movieClip libary item. Use the Properties panel to verify this.

Both Ken and I have used this process on multiple shapefiles with hundreds of objects and it’s worked like a dream.

Caution on Numeric Names:

Some GIS shapefiles have category names that begin with numbers, which Flash doesn’t like. Flash is picky about some other characters starting off the name, too, so when in doubt, use the following solution.

You can edit the schema to add a letter in front of each name and then use actionscript to do the same to each item in your XML file. A little cloogy but better than the alternative.

  1. Click the Add button in the Edit Schema window in MaPublisher’s Illustrator panel
  2. Name the new column “a”. Make sure the Type is string and enter “a” for the value (the derive value button must be unchecked to see this option).
  3. Press enter.
  4. Select #Name column.
  5. Find the expression field in the same dialog and type out “a&PRECINCT” (where “a” is the “a” attribute column name and PRECINCT is the attribute column name). Note: the & symbol is used to concatenate (add together) the string values in each attribute column.
  6. Press enter.
  7. Verify the name changes in the Layers panel.

Seperate Stroke and Fill Workflow:

To have a seperate stroke layer on polygons so the fills can be color coded seperately from the strokes (which would always maintain the same stroke color) you’ll need to make a 2nd copy of the symbols:

  1. In Illustrator after you’ve used MaPublisher to name all your polygons appropriately, duplicate the layer and hide/lock the original layer.
  2. Give the new polygons a stoke and no fill, and rename them using Steps 3-6 except append the naming scheme with “Stroke”
  3. Import the Illustrator file to Flash. Two groups of symbols are imported.One group’s symbols will be named something like “precinct234″ and the other group’s corresponding symbols will be named “precinct234Stroke”
  4. Flash can now be instructed via ActionScript coding to independently control a symbols fill and whether or not it is “highlighted” with a stroke.

Bonus Feature!

Use MaPublisher to import other GIS layers (roads, polling locations, etc.) and they will land directly on top of the thematic symbols. I recommend doing this in the same import session, or before you rescale the maps. Best results when all GIS shapefiles are already in the same projection.

To set up your XML which is used to import your map data values (essentially an XML version of your DBF file associated with the shapefile), check out Layne’s thread.

ESRI’s ArcGIS Server Provides Foundation for Maryland’s MD iMap (ESRI)

Tuesday, April 28th, 2009

mdimap

[Editor’s note: One of the more useful + powerful sites to leverage new Flash / Flex mashup capabilities of new ArcGIS 9.3 release. The site is designed both for state residents and government policy makers. Thanks Mary Kate!]

Republished from ESRI and State of Maryland. Original Feb. 11, 2009.

Authoritative Statewide Basemap and Performance Measurement Tool Serves Government and Citizens

Redlands, California—Maryland Governor Martin O’Malley recently launched the ArcGIS Server software-based MD iMap, an authoritative online basemap of Maryland that allows government and citizens to assess state, local, and municipal performance. As the portal into the state’s enterprise geographic information system (GIS), MD iMap also provides data to governments throughout the state including seamless, geocoded statewide centerlines and six-inch imagery. MD iMap embodies O’Malley’s vision of “one Maryland, one map.”

“In Maryland, GIS is vital to setting goals, tracking performance, and creating transparency,” said O’Malley. “We have been using GIS for years to increase government accountability and efficiency and to enhance transparency. With one comprehensive and interactive map for Maryland, our citizens will have access to unprecedented information online. From land conservation to public safety, the possibilities are endless when government becomes transparent and accountable to the citizens it serves.”

GreenPrint is the first GIS-based performance measurement application that is accessible via MD iMap. It is a planning tool designed to help government staff, conservation organizations, and individual citizens make good decisions about land conservation and growth. The state’s other performance measurement applications, including StateStat and BayStat, will be added soon.

To support government staff in Maryland, a secure agency login on the MD iMap Web site home page connects users to Maryland GIS Online, which is built with ArcGIS Online. On that site, staff can download data and Web services from other government entities in the state. In addition to significantly enhancing data sharing and coordination, the portal is innovative in its delivery of real-time, up-to-date statistics in one sleek, user-friendly interface.

“Governor O’Malley’s vision of one Maryland, one map, speaks to the best in government including accountability, unity, and service to citizens. It is also an outstanding example of a public and private partnership driving government forward,” said ESRI president Jack Dangermond.

Interact with the original at MDiMap . . .