Posts

Line Style With Arrows

A colleague of mine asked me if there was a way to put arrows at the end of drawn polylines. My answer was "Not out of the box directly :-( but you can create your own line style subclass :-) And here is an implementation in action. Check out the source code here .

Yet Another Heat Map

Image
While in Redlands last week, I was working with a client on how to create a heat map of an annual precipitation data over the US. He had about 11.5K map points with precipitation values and wanted to render this data very efficiently on the client browser using the new Flex API and wanted to have control over the rendering criteria. We loaded the data onto SqlServer and fronted it with WebORB (since he was a .Net dude, I'm a Java dude and would have used BlazeDS ) to enable RemoteObject interaction. The idea here is to bulk load the data using SQL onto some structure and AMF it to the client. On the client side, we take advantage of that structure and use the Flash graphic primitives to render it. Turn out the most efficient structure is composed of 3 arrays holding the x, y and precipitation values. Since on the client we did not need to interact with each value, I created a custom layer that sub-classes Layer to render the 11 thousand values on a bitmap, and then the bitmap is...

Accepted At 360|Flex Indy

I just got accepted to speak at 360|Flex Indy! The show will be going down May 18-20, 2009. You can check out the other great 49 speakers on the schedule at: http://360conferences.com/360flex/downloads/schedule.pdf It's looking like it's gonna be another great 360|Flex conference, especially with yours truly speaking. Tickets are cheaper on a first come, first serve basis! So buy your tickets asap at http://360flex.eventbrite.com to get the best possible price. See you there and you better go to my session!

Ground Overlays On Maps

Image
Found a historic map of Boston collected by David Rumsey, and thought it would be nice to be able to put this map on a current map. As the image needs to be scaled, rotated and translated, I wrote a custom symbol ( OverlaySymbol ) to enable the scaling, rotation and translation when the map extent changes. So all that is cool, but the problem was coming up with OverlaySymbol properties. So I wrote the OverlayEditor application that enables you to load the image and using a instance of Flex Object Handles , you can stretch, move and rotate the image. Once you are satisfied with the parameters, you can view the source code of a sample application that you can save and compile with a reference to the OverlaySymbol.as code. You can check out the application here . You can load an image of Mount Etna in Sicily. And like usual you can download the source code from here .

[ANN] Flex Mapping API For AGS Ver 1.1 Released

I'm very proud to announce that we just released the 1.1 version of the Flex API For ArcGIS Server . Check it out, and tell us what you think. Happy mapping all.

Constraining Map Extent

Though sometimes an ArcGIS map service extends the full world, an application that uses this map service will want to restrict the extent to a way smaller extent. In this post, I will be talking about how to achieve this. Check out the application in action. Note that when you pan the map, it "springs" back to the initial extent. And even after you zoom in, the spring is still in effect. So how did I do this is as follows: I created a sub class of the Map class. In the constructor, I added a LOAD event listener. The LOAD event handler adds two EXTENT_CHANGE event listeners, where one of them is at a lower priority to guarantee that it will called last. This low priority listener sole purpose is to get and save the map extent as the initial extent. In addition, the initial scale is computed and saved too. Now, upon an extent change, we check if the initial extent intersects the new extent. if it does, then we compute the horizontal and vertical overlap distance and we ad...

Collaborative Mapping using Cocomo

In this post I'm demonstrating how to use Cocomo 's data messaging to enable collaborative mapping. One or more map application can share their active extent and whiteboard using the mouse. Though the application is not very sophisticated, it demonstrates the extensibility of the flex api and the power of Cocomo. BTW, I highly recommend that you read Ryan's blog post on how to get started with Cocomo. Using the CocomoDevConsole, I created a CollectionNode and named it 'cocomoMap', and I added two non-persistant Nodes . The application uses the node 'cocomoMapExtent' to publish and receive active map extents, and the node 'cocomoMapPoints' is used to publish and receive drawn polylines. One of the cool things that I like in Cocomo, is that you can register a class with the MessageItem registry to enable the publishing and receiving of message bodies in 'native' format. So, I registered the class SpatialReference , MapPoint , Polyline and...