Duncan's blog

October 5, 2013

CFMap in Railo

Filed under: Coldfusion — duncan @ 9:45 am
Tags: , , , , ,

Adobe ColdFusion has had a CFMap tag since version 9.  It’s not a particularly useful tag, and I suspect it’s not widely used because it’s not too difficult to write your own javascript to call the Google Maps API yourself.  Alternative ColdFusion server Railo has had the CFMap tag since version 3.1.2.015.

Adobe made a bit of a mess of things when Google Maps deprecated version 2 of the API.  It was deprecated in May 2010 in favour of API v3.  Adobe ColdFusion 10 came out in May 2012, a full two years later, but still only supported v2.  So obviously nobody had bothered keeping up to date with what Google Maps were up to, or felt it necessary to update the tag.  The v2 API was going to become completely unsupported in May 2013; Adobe pushed out a hotfix in the same month to upgrade to using v3, but they could have done that as part of the CF10 release a year previously!

As it was, Google delayed turning off the v2 API until November 19 2013.  Apparently anyone still using it will be pushed a basic version of the v3 map instead, which should work for some basic maps, but probably won’t handle any complicated functionality.

So, assuming Railo to normally be quite up-to-date, with frequent updates and so on, I was surprised to spot this code in /mapping-tag/railo/core/ajax/JSLoader.cfc, which makes the AJAX request to load in the Google Maps API (I’ve prettified it slightly to make it more readable):

CFMAP: {
            provider: {
                google: ["http://maps.google.com/maps?file=api&v=2&key={_cf_params.GOOGLEMAPKEY}&sensor=false", "google/google-map"]
            },
            js: ["RailoMap"],
            events: []
        },

I found this bug already filed back in February 2013, and added my vote and some comments.  It seemed to be about the API key being invalid, and at a guess the user’s key is for v3 not v2.  However the real issue is its use of the old API. So I’ve raised a new feature request for upgrading this; feel free to vote for it.

So in short, Railo haven’t been any better than Adobe in keeping up with updates to Google Maps from 3 years ago!  Although to be fair, I expect the proportion of people using this tag on Railo CF is even less than on Adobe CF.  Read into that what you want – in short the sort of person using Railo I suspect is less likely to need the sort of client-interfacing handholding that tags like CFMap are meant to provide.

Advertisements

Leave a Comment »

No comments yet.

RSS feed for comments on this post. TrackBack URI

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

Create a free website or blog at WordPress.com.

%d bloggers like this: