Wednesday, August 20, 2008

CottonWood Heights Facilities Using Modest Maps

I've spent some time looking at and working with Modest Maps. Its a terrific base map library written in AS3 which accesses a range of map servers including Yahoo, Google and Microsoft Virtual Earth. I wanted to test out the new functionality of Modest maps after Tom Cardens rewrite. I'm tempted to approach the city of Cottonwood Heights to see if they wanted to incorporate this type of mapping into their web site. Anyhow the link is at:

Monday, July 21, 2008

Municipal Mapper

I sometimes visit the local city web page here in Salt Lake. I live in Cottonwood Heights and their web site
is nicely designed. They even have some simple interactive mapping functionality added. But the site is filled with location references from events, to library locations, to proposed areas for rezoning. All beg for maps. Similarly no feedback mechanism is in place to allow residents to provide feedback on location specific areas of concern or interest. I put this interactive map together quickly using Flex 3 and Mapserver. It allows users to zoom and pan the map. It also includes a checkbox options to show, on the map, the location of schools etc. Finally, it also allows users to enter their own information such as races, festivals etc. These are dynamically added to the map with a description provided by the user. I used the geocoder provided by Google to convert the entered address to lat/long. Here is a video of the application:

Flex Map using Mapserver from matt sheehan on Vimeo


I was watching the superb videos by Terry Jones (of Monty Python fame) on the Crusades recently. It struck me that what would make these videos even better would be a map which tracked the places mentioned. Maybe even an interactive map. I messed with this idea and created a prototype of geodocumentary. The video was chosen randomy (it is actually one of the funniest scenes from Only Fools and Horses). Cue points are used to add a georeferenced point to the map showing the mentioned location. Here is a video of the application:

Flex and Video from matt sheehan on Vimeo

Flash and Flex mapping fun

The two applications below are more mapping past work. In 2002 I built a Flash mapping application which was built using Flash, Flash remoting, Java, ArcIMS and ArcSDE/Oracle. I built the tool from the ground up. It was fun and my first taste of Flash (with its challenges for application development without animation). The map tool provided the usaul zoom, pan etc. Also extraction. Here is a video of the application:

Flash Map with Java from matt sheehan on Vimeo

One more from the archives. Built using Flex 2 and using SVG data. Its a ski map application which allows users to pan and zoom. I blended in georeferenced imagery. For me the coolest part of the application is the video. I took a video skiing down a run and manipulated the resulting file to add cue points and converted to FLV. So as the video plays georeferenced points appears on the map tracking the skiers progress. Here is a video of the application:

Ski Utah Map using Flex and SVG from matt sheehan on Vimeo

Flex Map tool building

Here is an early experiment done with Flex 2. Mostly it is a simple image display tool. But PDf generation and historic data is included. Doing this work made me realise the power of Flex. Here is a video of the application.

Flex Design 3 from matt sheehan on Vimeo

As an add on to this work I was asked to create a dynamic map application. In the end I built the tool from scratch; using a combination of Flex 2, PHP and Mapserver. The cool piece for me was having PostGIS ad Postgres feed the data to the application. There was historic data which made things a little tricky, since I had to separate the spatial and attribute data into separate tables.

Flex Map with PHP and Postgres/PostGIS from matt sheehan on Vimeo

Data Centre Visualisation

I noticed recently the use of Vimeo on a number of web sites. Rather cool being able to embed video into you web page. I've uploaded some of screen capture videos of some of my work. Text comes out poorly but it is still rather nice. Here is a none mapping application I put together for a data centre visualisation. Here is a video of the application:

Flex Data Centre Visualisation from matt sheehan on Vimeo

Thursday, February 28, 2008

Flex-Google Maps Collaboration

Another one of my favourite bloggers; Christophe Coenraets. Here he has created In Flex a Google maps mash up:

Thematic mapping

Peter Ent has a terrific blog. Here he has put together a thematic map in Flex 2:

Internet Mapping .. the players

Let's list some of the Internet Mapping options:

Hard core GIS - ArcGIS server
  • expensive, tonnes of overhead, administrative hell, need for application server.
  • tools for web application generation, customisable components.
GIS and image generation - Mapserver
  • reduced GIS functionality.
  • free, easy to configure and administer, only need web server.
Interactive maps 1 - Flash/Flex 2
  • need to build from the ground up all tools and components, resolution.
  • very easy to take vector or bitmap images and create unique interactive maps.
Interactive maps 2 - Zoomify

Proprietary Mapping API's - Yahoo, Google, ESRI arcWeb

  • they control/track usage, they own the API and can change it at will, they own the data and can add any elements they wish (eg. advertising).
  • quick and easy to build a data populated fully interactive map.
Thematic maps - Flash/Flex2
  • Combining Flash swf inside Flex 2 (often best way) can be challenging, map itself need be broken into separate interactive objects which need to be pregenerated.
  • With Flex 2 charting these are very powerful ways to convey information.
Multimedia maps - Flash/Flex 2
  • Pulling all assets (images, video, audio) together.
  • Another powerful way to convey information.

Internet Mapping .. some thoughts

I come from a GIS background. In 1997 I built a mapObjects IMS application. It was one of the first Internet GIS products. Those were the early days. Later I built an application using ArcIMS. Again ArcIMS had just been released. Working on this project I realised in large part we were using spatial (GIS) servers as image generators. I'll not go into the ins and outs of GIS suffice it to say GIS is a powerful spatial analysis tool. Using the cost and overhead of spatial servers to simply regenerate a new map image, struck me as a little daft. There are many ways to show maps on the web, but often people fall back on expensive spatial servers (sometimes it makes sense often it doesn't). It started me on this ongoing adventure into Internet mapping.
In Flex 2 I've chosen one of the newest web development tools out there. Building mapping web sites has never been more fun, flexible and exciting.

Tuesday, February 5, 2008

Yahoo Aerial Map

I've been interested for some time in how to grab Yahoo map tiles. Starting with a lat long envelope how do we find the relevant tiles and display them? Further how do we pan, zoom and add overlays. Modest maps do a nice job using various providers (openstreemap, google etc). But working through their code base has proved, even for experienced developers, somewhat challenging. I decided to build from scratch a simple Flex 2 map viewer using Yahoo Aerial tiles. The results can be viewed at:

Its mostly a proof of concept; pan and centred zooms still need some work. But it proved a much easier task than expected. Flex simply calculates the tiles needed, requests these tiles and displays them in a Sprite grid. Overlays are added to individual tile sprites after calculating the tile and pixel position within the specific tile.

Building Flex 2 Map Applications

An article I wrote, bit wordy but worth posting ....

Web mapping applications have come a long way over the last few years. The market has split into numerous segments. These include:

  • GIS based applications relying on proprietary products such as those from ESRI, notably arcIMS and arcGIS, and open source alternatives including Mapserver.
  • Sites built around Google maps, Microsofts Virtual Earth and Yahoo Maps.
  • Flash based sites which run in the client using high definition map imagery.
When talking to clients about their mapping needs and tools to satisfy this need we have found much confusion. Is this to be an interactive mapping application or one which provides GIS functionality? More importantly is the difference clearly understood. Google provide a mapping application, ESRI are fundamentally a GIS company. Do clients want the expense and overhead of ESRI products if they only want to display maps (don't get us wrong we love the ESRI product suite)? So purpose, understanding, budget and maintenance are all things to consider. Another is client verses server. We started working with Flash and Flex 2 because we could create nice interfaces, we liked and recognised the power of actionscript and lastly we knew how much we could (potentially) do without needing server calls. The latter, as we will outline, has is own limitations but makes for a remarkably fast application.

Pure GIS

So what is the purpose of the Web site? Are you serving simple interactive web images, or is this a web site whose purpose is to provide spatial analysis. If it is the latter then advanced spatial servers are a requirement. ESRI are the major vendors of GIS software; ArcIMS and ArcGIS, are their two flagships. So buffering, modelling, layer query, data extraction and much more are possible with these products. ArcGIS is a complex beast to install and administer, its also expensive. But it provides extensive GIS functionality out of the box and is highly customisable (through arcObjects). Simple mapping applications are easy and quick to build using .NET (Java is another development option but is poorly supported).
Thoughts and Observations
From our experience most mapping web sites use backend (GIS) servers to simply generate map imagery. Thus a zoom changes the map envelope (extent) and thus requires the regeneration of the map image with the new extent and new resolution. To pay for proprietary software and simply use it for image generation is, in our view, daft. The open source route through Mapserver would be a better way to go (which also offers GIS functionality). But if you are developing a high level GIS applications (and have deep pockets), then the ESRI suite is an excellent option.

Flash Maps

There are a range of excellent mapping sites on the web which use Flash. Flashmaps generate a range of interactive flash based maps commercially. One of the earliest examples we found on the web of a Flash GIS map site was the Davis streetmap. Inspired by this work we at Flexmappers built a Spatial Data Clearinghouse for the US Forest Service (USFS). The success of this application led to other similar USFS projects including the NPSG dynamic map.
Thoughts and Observations
Flash runs on the client in a browser plug in (the flash player). Browser compatibility is not an issue, but users will need the appropriate plug in, or player, to run the Flash application. Developers have the option to bundle all data into the downloaded SWF. Thus the initial application loading is slower, but map interaction then demands no server calls. Flashmaps take this approach for some of their mapping applications. You can also use Flash Remoting to make server calls. Thus the Spatial Data Clearinghouse communicates with ArcIMS (via Java) to provide map interaction and data extraction. So what are the disadvantages? Flash was initially developed as an animation tool. Though Actionscript 2.0 was added and is powerful for application development. Flash remains best for animation development.

Flex 2 Maps

Flex 2 was released in June 2006. Its uptake has been somewhat slow, particularly in the web mapping arena. To their credit ESRI were quick to see the possibilities and launched ArcWEB Services. For the reasons outlines above with regards Flash we were interested in the possibilities Flex 2 offered. Two early prototypes we developed included the Ski Solitude SVG interactive map and a MapServer map viewer. Christophe Coenraets has started working with Flex 2 and Google maps.
Thoughts and Observations
Some of the advantages of Flex 2 include:
  • No cross browser compatibility issues.
  • A rich set of tools to build sophisticated 'desktop like' web applications.
  • Programming done in Actionscript 3; a powerful object oriented language.
  • Client processing, more can be done within the clients Flash player to make sites extremely fast.
To put it simply, we love Flex 2! For Web application development, in our view, it is unrivalled. The creation of sophisticated, great looking, user friendly Web sites has never been easier. For the creative, less technical it is easy to learn and use. For hard core developers, Actionscript 3.0 is incredibly powerful. Used alone or in combination with Javascript/Ajax, PHP etc, the development possibilities are endless. In the online mapping world, where we are focused, we have only just begun to explore the possibilites. Our Ski Solitude application, outlined above, is a client based application, which loads all data on the client side. As a result map interaction almost instantaneous, since it does not reky on server calls to reload the map etc. The Mapserver application uses Flex 2 to build the interface and communicates with PHP for server interaction. We would be happy to share the code for anybody interested. We are looking into advanced GIS functionality using Flex 2 - ArcGIS. Additionally, we are experimenting with adding overlays to maps, allowing users to click georeferenced points to view movies, video, charts etc; Flex 2 is a wonderful multimedia environment.

Modest Maps

The excellent open source Modest maps has both a Flash and Flex 2 api for connecting to and displaying Google Maps, Microsoft Virtual Earth, Yahoo Maps and a number of other interactive map providers. In addition they have a zoomify plug in which enables developers to use 'zoomified' images in a map viewer.
Thoughts and Observations
We are interested to see where this work is going. We have played with modestmaps and have built a test application. Much of the initial work has been done in Flash, slowly things are being ported to Flex 2. When we get chance we plan to dig into the code maybe help with porting and add functionality (hooking into the ArcGIS cache is of great interest). But this work is well worth checking out.

Flex 2 and Mapping

After working for years with Javascript, Java and Flash to build mapping web sites, I am now a Flex 2 convert. Some time spent noodling with Flex after its release showed how quick and easy it was to create great looking, highly functional mapping web sites. On this blog, I'll share some of my thoughts on developing mapping sites using Flex 2, and show some examples. I'll also share ideas and findings on web map development.