Thursday, 19 November 2009

GIS Dashboard Replication with STRATUS RIA tools / DOJO (5)

Wow! Lot's of progress today. Finally got my head around the fact that the API will allow you to search a specific MapInfo table for data that relates to that specific point. So if I want to find which ward I'm clicking on, for example, I can just use the search at point method and connect it to the wards table and it will give me the name of the ward. Simple!

I have a demo working now where a mouseclick will give the easting, northing and ward name of the point I have clicked on the map. I now have to figure out how to pull enforcement statistics back for the ward I have clicked on; just need to get my functions in the right order.

Tuesday, 17 November 2009

GIS Dashboard Replication with STRATUS RIA tools / DOJO (4)

Another pretty successful afternoon. Three of us have worked together to figure out how to pull back and display event information within a specific radius of a point on the map. We also discovered that the map was configured wrong based on the PB examples (their bounds are set for London, not Knowsley).

There doesn't appear to be an onMapMouseOver event (or something similar) to fire an event when the mouse is moved. I phoned the support team and they said that they tried to get it to work but couldn't. That's a bit of a shame.

Now I need to start planning how to actually put the dashboard together and also if there's a way to filter data that gets pulled back from the Geostore table. I also need to work out how to show events for a specific area partnership. Lots to do but much further on than I thought I would be after just two days.

GIS Dashboard Replication with STRATUS RIA tools / DOJO (3)

Success! After yesterday's frustrations at not being able to download the right files a colleague who knows a lot more about setting up Apache websites than I do suggested recreating the Stratus web server locally and pointing Aptana at the local version instead. So we did the following:
  • Installed Apache Tomcat 5.5.23
  • Copied the contents of the Stratus webapp (that's the root for Tomcat much like inetpub\wwwroot is the root for IIS) into the local webapp folder
  • Created a new project in Aptana and pointed this to the ria content on the local machine
  • Moved all my test files across and hit compile

After a little bit of messing with the filepaths for the .js and .css resources we were good to go. The map displayed and I was able to move around, zoom in / out and all that good stuff.

Now I've started working on getting onclick events from the map, and also using the features tables to do a 'Find My Nearest' search for libraries and one stop shops. This is giving me a little headache - I can't get any x / y co-ords to work other than the sample ones provided by PB - but I'll get there.

A good morning's work.

Monday, 16 November 2009

GIS Dashboard Replication with STRATUS RIA tools / DOJO (2)

Bit of a frustrating afternoon. I've been building up the structure of the application and making sure that all the necessary .js files are available (there are a lot). If you dump a load and then refresh Aptana it takes a few minutes to update itself which is irritating (I guess it's compiling all the content or something).

Now I have got to the stage where it looks like FireFox is downloading a load of content from the server that the API sits on but it's trying to get hold of one particular file in a folder that doesn't exist (ria/widgets./i18n.js) anywhere on the server. I wonder if this is a bug? The wierd thing is that the examples work fine so maybe it's something I'm doing wrong.

More tomorrow.

GIS Dashboard Replication with STRATUS RIA tools / DOJO (1)

Just finished 1/2 day #1. Spent the morning setting up the development environment and running through some basic DOJO tutorials. Achieved the following:
  • Downloaded and installed Apanta Web onto Windows XP (http://www.apanta.org). This is a free development tool that comes with a DOJO plugin that makes life easier.
  • Downloaded and installed FireFox (http://www.mozilla.org). I am reliably informed that you have to pay for a debugger that works with IE; the FireFox one is (of course) free.
  • Set up a new project in Apanta. If you create a default web project then it asks you if you want to add the reference to DOJO. Learned how to add files, set the start page, that sort of thing.
  • Worked through a series of DOJO tutorials at http://www.sitepen.com/blog/2009/10/30/why-dojo/#more-770 that show off some of the cool stuff you can do pretty easily. They all eventually compiled and worked.

There was a bit of post - install jiggery pokery for Apanta; you have to download and install the DOJO plug in, set the proxy properly so that it can connect to the web (for some reason it didn't like the new proxy we have installed) and set up a debug environment that defaults to FF and not IE. But after a mornings' work I'm good to go.

GIS Dashboard Replication with STRATUS RIA tools / DOJO

On Friday I was asked to drop everything and investigate how we can replicate an existing GIS dashboard using the STRATUS RIA tools (http://stratus.pbbiblogs.com/tag/ria/) and the DOJO toolkit (http://www.dojotoolkit.org/). DOJO is a JavaScript library that let's you do extremely cool things. If I stick to my plan then I'm going to record my experiences here and there should be an update for every 1/2 day that I spend working on this project.

Monday, 5 October 2009

PLINGS Development

Started working on the app on Thursday. Have done some learning about the ASP.NET AJAX controls that come bundled with ASP.NET 3.5. There's a few new things around using the ScriptManager and an UpdatePanel but once you get your head around these it's OK.

Today I started looking at the 'Create Activities' function. One of the requirements for this is to allow a user to choose a recurrence type from a menu (i.e. daily, weekly) or create their own custom recurrence type (for example fortnightly every Thursday). I think to implement this I'm going to store a list of recurrence types in a database table together with information on the recurrence and then offer this list to the user on the Create New Activity screen. One of the options will also be to create a new Recurrence type and if they choose this they will get redirected to another form once the activity has been created. This form will allow them to build the custom recurrence type and link it back to the Activity they just created.