brentporter

Hammer. Nail.

Blog Post created by brentporter on Jan 29, 2015

"If you only have a hammer, you tend to see every problem as a nail..." - Abraham Maslow

 

Continuing work on my project - Bootstrap with a side a map, the quote above came to mind as I was wrestling with colliding javascript namespaces. And not just because I tend to hammer my way through things!

 

Actually as the dust settled and I had my chart library working in conjunction with the other functions, it reminded me again of WHY I am working at this project from a Bootstrap-centric perspective, rather than a map-centric view.

 

See, ESRI has a github project for integrating the javascript api with bootstrap already. So why not use it? To continue with the thread of thought I mentioned above - because most people are not map hammers. And the most people I am referring to here are users, those pesky folks for whom we ultimately build our apps.

 

The trend now is for the us to make maps that kind of 'swallow up' the application, with other things floating above the map. This is great for me because I love maps. If you are reading this, you probably love maps also. That's great but most folks are not looking for an immersive map experience. The spatial information is just a means to an end.

 

What does all this mean to my project and development in general? Well for me, it means making sure I know when to use my map hammer and when to use a traditional 'CRUD' hammer with a side of map thrown in.

 

And how is that going? Quite well, I tend to feel my way around the screens for a time before I really integrate them all in. And so far I have created a map panel, as well as a form panel and an analytics panel. The map panel is great - with some of the earlier versions of javascript api/dojo, it was much more intrusive to get the map into the application. Now I just had to do the following -

 

<div class="panel-body">
     <div id="map-canvas"></div>
</div>

 

 

And then do some of the boiler plate dojo load/require parameters like so

 

require(["esri/map", "dojo/domReady!"], function(Map) {

  map = new Map("map-canvas", {

   basemap: "topo",
   center: [-97.72, 30.28], // longitude, latitude
   zoom: 11
...

 

and then I had a map panel, that fit in nicely and appropriately with my other panels. I guess you could say I found a smaller map hammer to use. Thank you ESRI!

Outcomes