Dojo Events – Template or Programmatic?

Events and how best to attach them to widgets.

When you are wiring up events in a custom, templated widget, do you wire them up using the template (using “data-dojo-attach-event”), or do you wire them up in the postCreate of your widget? Is one better than the other?



Let me know in the comments!


I’ve released my first Node.js package on NPM, called simple-geocoder. It’s a very simple API that allows easy use of the ArcGIS Online Geocode service in your Node apps. Just do an npm install simple-geocoder in your project folder, then an example usage would be:

var geocoder = require('simple-geocoder');
geocoder.geocode('1600 Pennsylvania Ave NW, Washington, DC 20500', function(success, locations) {
    if(success) {
        console.log("Location: ", locations.x, locations.y);

Github Repo
Npm Entry

Map Wikipedia

map-wikipediaMap Wikipedia is a web mapping app that allows you to map an entire Wikipedia category. It uses the ArcGIS JS API, Node.js, Mongodb, and the Wikipedia API. It is still a work in progress, but I hope you will find it useful or fun.

Please post your comments and ideas for future releases here! I’ll add GeoJSON exporting and a few other things in the coming weeks. I hope to release the source code on Github after I clean it up a bit.


arcgis-jsonI just released a tool that utilizes Terraformer and Restify to make it easy to convert (and map using GitHub’s GeoJSON maps) the JSON you get from ArcGIS Server Endpoints (like this) into GeoJSON. There’s even a bookmarklet that gives you a 1-click option.

Tip: Make sure you set the Out Spatial Reference when doing your query on the ArcGIS Server to 4326 to get the best chance of success.

Here are the pertinent links: