Wednesday 29 July 2015

A (Better) map viewer template

Based on blog and github stats, the bootstrap map viewer templates that I talked about in a previous post seemed to be the my most popular repo and 2nd most popular post of all time respectively. I'm glad you like it :)

But to tell the truth, I have since found something significantly better and in a humble case of acknowledging that someone made something better than what I have, suggest that you give it a try.

I am talking about Tobias Bienek's sidebar-v2 responsive map viewer template.

Just look at this screenshot!


This template is basically my dream responsive map viewer layout fully realized, which I've been trying to replicate for the longest time since I first heard of bootstrap.

A cursory glance at the repo shows that it's written in the most un-obtrusive of HTML, CSS and JavaScript which means actual integration of bootstrap-styled content should be a simple affair, and their examples already cover all the possible map viewer solutions you would ever use.

So if what I've made is less than desirable, give this template a go.

My favourite C# 6 trick


The nameof operator is awesome! Now even your string constants can be codified!

Between the nameof operator and localized string resources, you don't have much excuse anymore to use naked string literals.

Monday 27 July 2015

My weekend project

Since Visual Studio 2015 was just released, I decided to have a play with Roslyn this weekend.

Check out them red squiggly lines!


400,000 pageviews!

Thank you for your continued eyeball patronage!


Tuesday 14 July 2015

Announcing: mg-desktop and nuget packages

Hot on the heels of MapGuide Open Source 3.0, is a new release of mg-desktop.

Along with fixes in upstream platform components, this release of mg-desktop includes new convenience APIs that I'll cover in an upcoming 3.0 showcase blog post.

If you use NuGet to consume the MapGuide and mg-desktop APIs. NuGet packages for the new release of mg-desktop and the MapGuide API for 3.0 have also been uploaded.

Install-Package away!

Or you can download the mg-desktop zip packages here.

Monday 13 July 2015

GovHack 2015 post-mortem

Last year, I said I would be interested in attending the 2015 iteration of GovHack. Well, this time round, I almost didn't make it. I didn't get wind about the tickets for this years event being available until 5 days after the initial announcement and it seems that was enough time for tickets to be sold out. Well fortunately, one Saturday before the event, I get the email notification that I'm off the wait-list so I claimed that available ticket before it was too late and I was locked in for GovHack: Round 2.

Although I did have a idea about what to build this time round, the key materials needed to make this idea work arrived too late to realistically execute this idea of mine, so I've put that idea on ice (yes this whole preceding sentence is kept intentionally vague :)).

Compared to last year, this time round was much smoother. Team was assembled quickly, we had several potential ideas worth pursuing for the next 46 hours. In the discussions that followed it was decided that we should have an interactive map. Cue my map expertise ... :)

So armed with my brand new hackathon-grade ASUS Zenbook that I acquired a few months earlier, we set forth to build ... yet another MapGuide concoction.


Unlike last year, this time round wasn't a load-everything-into-MapGuide and house it in a Fusion application affair. This time round, we looked to build a MapGuide application geared towards modern browsers and mobile devices, using the building blocks of OpenLayers 3, Bootstrap and Knockout.

The end result, is our GovHack 2015 entry: The VET provider map.


The VET provider map allows people to look for Vocational Education and Training (VET) providers in the state of Victoria. With this map, people can search for:

  • VET providers
  • Occupations (which would then show related pathway courses and the providers that offer them)
  • Courses (offered by a provider, that is a pathway to a given occupation)



Unfortunately, due to time constraints the (bits that I mentioned in parentheses) could not be completed within the weekend, meaning that while you could search for courses and occupations, the crucial link to the actual providers on the map that offered such courses is not there. Still, what was implemented should convey what we are trying to achieve with this application.

The search capabilities are powered by the data publishing framework of mapguide-rest, which gave our spatial data sources ready-to-go (Geo)JSON APIs for our application to use, and also "cleaner" JSON property names (pet peeve of this hackathon: Dealing with property length limitations of the SHP file format and undesirable property/column names. Ugh!)

Other features of this map include:

Popups driven by QUERYMAPFEATURES responses from point-based marker selections (applicable for VET provider markers)


A modal-based legend/layer toggler that shows when you hit the "Layers" button on the map viewer.


And finally, the whole application is responsive.


But don't take the word of my gifs and screenshots, you can see the map in action for yourself from our demo site linked on our hackerspace page. Once again, the demo site is hosted on a Amazon EC2 micro instance (be gentle :)). If you're interested in the source code and data that drives this map, you can find that on our GitHub repo. Be sure to vote for our entry if you can.

Thanks to the team (Ling, Tim and Hans) for your coding, data acquiring, wrangling and video production efforts. It's been a blast!


Until next time ...

MapGuide 3.0 feature showcase: Stamen tiles

With MapGuide Open Source 3.0, we've expanded the set of available external base layers in Fusion with support for Stamen tiles.

Stamen tiles provides stylish cartographic renderings of OpenStreetMap data in 3 different styles:

Toner


Watercolor


Terrain



You can specify these new external layer types in your Application Definition. The latest M4 release of Maestro 6.0 already supports these new layer types.


Which gives your Fusion applications extra base layers for real-world context.


Announcing: MapGuide Open Source 3.0 Final

Here it is! The final 3.0 release of MapGuide Open Source.

This release contains one small fix for selection on Linux

I've still got a series of overdue blog posts covering what's new in MapGuide 3.0. Stay tuned.

Download