Updates to agni.sl.mapapi.net

I’ve made quite a few changes to my pluggable version of slurl.com, most of which centred around replacing the hash-slurl.js plugin with hash-fu.js. Below is a summary of the changes made today.

The Map

  • Removed some CSS code left over from the original work done for Hack a Day 2009.
  • Replaced hash-slurl.js with hash-fu.js.
  • Removed the Gears plugin since that’s being phased out, with developers being encouraged to use HTML5 goodness.

UI Top Bar

  • Plugins for the UI top bar were altered so they’d report an error if the UI top bar plugin wasn’t loaded instead of throwing an exception to the JavaScript console.
  • The UI top bar plugin was tweaked so it could be hidden.
  • If the error reporting plugin is loaded, but UI top bar isn’t, the modal dialog pops up immediately instead of adding a notification to the UI top bar.
  • Implemented a feature request; When plugins with drop-down boxes are loaded into the top bar, they’re hidden until they’re populated with options.
  • A bug in the region search plugin was fixed (return false wasn’t getting passed from the search handler to the event handler).
  • Support for hash-fu.js was added to the third party services plugin. Example loading the New World Notes stories featuring SLURLs.
  • mapapi.js

    No feature alterations here, just some fixes for a couple bugs that cropped up during the course of today’s updates, one of which was in the error handler and the other was to fix how axes with co-ordinates set to 0 were handled.

    hash-fu.js

    hash-fu.js isn’t too dissimilar to hash-slurl.js, in the respect that they both monitor document.location.hash for changes, then attempt to act upon those changes.

    Where hash-slurl.js tried to cram the processing for such changes into the same file, hash-fu.js prefers to leave such logic to other plugins. Where hash-slurl.js uses an if-else structure with hard-coded feature support, hash-fu.js uses a for structure with callbacks. Additionally, it supports multiple commands being fired in the same fragment via a fake query string e.g. example.com/#?foo=bar&slurl/Ahern/.

    Leave a Reply

    Your email address will not be published. Required fields are marked *

    *

    You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>