Posts

Heat Map Layer Revisited

Image
Following this post, Glenn G. found an "issue" when panning the map. I revisited the project and indeed there was a bug. Thanks Glenn. I updated the project and here is the result. In this project, I downloaded from geonames all cities with population over 15000 and plotted them on the map. The clustering of the cities (over 21,000) generated a cool heat map. Check it out and tell me what you think. And like usual, you can download the source code from here .

How Oracle Can Improve Java

Found this great article "15 Ways Oracle Can Make Java Better (and Improve Its Stance with Developers)" - here is my "in the weed" take: Keep JavaONE - with heavy focus on developers. Embrace OSGi down in the core VM. Kill JavaFx - Work closer with Adobe on Flex / BlazeDS / LCDS . Improve Dynamic Language Support - groovy / scala / JRuby / Jython /etc... Talk to Google about ME (seriously?) / Android Kill NetBeans - Eclipse may be King, but IntelliJ is God ! Introduce new language primitives XML / Function / JSON. Improve language - set/get bean, native String ( switch myString {case "foo": ...}) as for casting. LINQ for Java - LCDS can help here. Talk to the Spring folks - there-is-only-one-framework-zuul :-) No "Effing" store ! So....what do you think ?

Street View Within Flex API for AGS

There is this great sample in our code gallery where a Google Streetview is integrated with a map based on the Flex API for AGS. However, what I wanted is to have the street view to be part of the map, not an HTML sibling element. Found this project (flex-iframe) on google code, where you can display an HTML page inside a flex application. So I went ahead and merged the two projects. One of the requirements is to modify the template html file that is generated by Flex Builder with additional javascript code that enables the bridging between the flash and javascript world. I was not thrilled with fooling around with generated code, then I remembered the JavaScript flex tag by Abdul Qabiz . This flex element enables you to put javascript code _in_ a flex application, and on initialization it will be "evaled" and injected into the parent document DOM. So I merged all three projects together and this is you get. Check out it and tell me what you think. And like usual, the sou...

Yet Another Resizable TitleWindow

Was kinda ticked that TitleWindow did not have a resizable property :-( Found this reference when I googled "ResizableTitleWindow" - but was way too heavy. I just needed a _simple_ resizable title window, where I can grab the lower right corner and drag it to resize the window. Then I remembered that flexlib has a MDI package and I was always impressed with the code quality :-) Found the most excellent code for the MDIWindow component with resizable behaviour and additional features that I did not need. Here is my yet simplified derived version. And like usual, you can down the source code from here . BTW, I leave it as an "exercise" to the reader to add a visual element to the title window to indicate that it is resizable.

Spatial / Temporal MBTA HeatMap

MassDOT issued a visualization challenge , where it is calling on developers to use released CharlieCard data to visualize "A Day in the Life of the MBTA". The following three applications use the Flex API for ArcGIS as a response to this challenge. The first application (click here to view it) consists of two maps. The first map contains a dynamically generated heat layer that morphs based on the selected hour. The second map is an isometric projection, but the T lines are represented in a schematic layout rather than a geographical layout. A schematic layout is what you see when you step up to a metro map at the station. You, the user, can rotate the schematic map by holding down the left mouse and dragging it left or right (no zoom in, sorry). At the bottom of the application is a horizontal slider. As you drag the slider, you are changing the "current" hour and minutes of the day. On the geographic map, the heat layer will reflect the CharlieCard counts per st...

Map Layer From Local Shapefile

Image
In this post, I will demo how to load a local shapefile from your hard drive, and overlay it on an map whose base layer is derived from a remote ArcGIS server. Using the Flash Player 10 FileReference API, this task is fairly easy. However, I did not want the user to be prompted for each imported file as a shapefile is composed of a .shp file holding the geometry and a .dbf file holding the attributes. So, the idea is to zip the shp and dbf and load the zip, and then let the application unzip the content and parse the shp and dbf entries. The application is using the Flex API for AGS and makes use of two wonderful as3 library; the shp library from Edwin van Rijkom , and a zip library from David Chang . In this application, I created a custom geometry to take advantage of the coordinate array format in the shapefile reducing the impedance and taking advantage of the "compression". Well, this not truly compressed - this an array of x,y,x,y,etc... rather than an array of MapP...

Horizontal Map Slider

A customer emailed me asking me how to create a horizontal map slider using the Flex API for AGS . The Map component has a property navigationClass to enable users to define a custom navigation class. <esri:Map navigationClass="com.esri.sample.MyNavigation"> In this sample, I defined a reference to the class com.esri.sample.MyNavigation which is a subclass of the Navigation class. public class MyNavigation extends Navigation { public function MyNavigation() { mx_internal::layoutObject.direction = BoxDirection.HORIZONTAL; navigationSliderClass = MyNavigationSlider; } /** * Override the order of the components. */ override protected function addZoomInZoomOutComponents(zoomInButton:UIComponent, zoomOutButton:UIComponent):void { addChild(new Spacer()); addChild(zoomOutButton); addChild(zoomInButton); addChild(new Spacer()...