Conversations at the Mozilla Summit 2013.

I was privileged to attend the Mozilla Summit this year in Santa Clara. Over the period of three days, I had some interesting conversation with people from different technology backgrounds and this post is more of a self reference for me to come back to.

Robert Kaiser and I had an interesting conversation about his maps application for FirefoxOS. His app uses just HTML Canvas to visualise the tiles on the client side and also take care of all the interactions – no third party libraries.

I grabbed breakfast with Mark Giffin one morning and we started talking about rendering indic language and making them print ready. At Akshara, we use several techniques like Phantom.js to achieve this. Mark suggested that we should conside DITA. DITA provides comprehensive solutions for typesetting.

Amir Aharoni of the Wikimedia Foundation joined our discussion and introduced Firefox as part of the solution. Pointing out that Firefox works very well in rendering indic language from his experience working with the language team at Wikimedia. That’s most of what we are doing at Akshara right now, but there are local dialects which need more work.

I have known James Hughman for couple of years now, since his visit to India for the Droidcon. He joined Mozilla recently and I was excited by the fact that I would get to see him at the summit. We spoke about the books that we are reading, the new DRM policies and so much.

Toby Elliot introduced the new location services that Mozilla is building. I had  a chat with him about how we can use OpenStreetMap data and probably help improve the infrastructure. There’s a very exciting email thread going on between us right now to figure out how we can get this going.

Bill Walker was curious about the new maps project that we are doing in Congo. His brother being an archeologist does a lot of mapping and have been considering building platforms for collaborative mapping. We shared and talked about some of the existing systems and how we can adapt them for the custom usecases.

There are more people that I have spoken to than the above, but definitely these are the conversations that will continue and probably make way for more posts!

Zoom level based marker interaction using Leaflet.js

With Arky I was creating a map of the Mozilla l10n teams world wide and decided to use Leaflet.js. He send across a CSV data sheet which contained the geo-tagged teams and other information. Wrote a Python script to generate markers corresponding to Leaflet.js (Yes, my JS skills suck). When we laid the markers on the map, we found that it looked all crowded and difficult to locate one team quickly. I took this discussion to the HasGeek channel and Nigel showed me the Ubuntu Loco Global Events map. The markers in the map changed based on the zoom level of the map. That is pretty neat idea to handle crowded map markers. But they were using Google Maps.

I wanted to make this happen with Leaflet.js and OpenStreetMap data. Leaflet.js is perhaps the best, easy and intuitive interactive mapping library that I’ve come across. I spent some time in the documentation and came up with this idea and voila! – it worked.

Leaflet.js provides several events, the one which we will use is zoomend. This event gets triggered whenever the zoom level of the map changes. Exactly what we need. This is how I did it.

If you have a bunch of markers, use LayerGroup, that will give you better control. You can now add/remove the entire marker set by the LayerGroup handler.