OpenStreetMap

GSoC: iD editor blog 2

Posted by kepta on 26 May 2016 in English. Last updated on 30 May 2016.

Hello OSM community, this would be my 2nd diary post for my Summer of code project. Do checkout my first blog post where I introduce myself and the project I will be working on.

This week would be the last week in the community bonding process. All the GSoC students would receive their first stipend at the end of this week. Hurray !!!!

I believe my community bonding is going well. This week I was mostly busy with adding mapillary-js to iD. Thanks to the awesome work by Peter Neubaur, we have a PR ready to implement this feature to iD.

If you use iD editor you will find that the mapillary images are static and don’t have navigation buttons.

Mapillary Layer

To have this feature, we would need mapillary-js in iD’s source code. This library gives the developers powerful new ways to interact with mapillary ecosystem. But this was easier said than done. Peter helped us with setting up the basic work required for the inclusion of this library.

The major problem which I was aiming to solve was the asynchronous loading of images by the mapillary-js. If you quickly click on multiple points, the system suddenly enters into chaos. The point highlighted and the current image no longer tally. The following screen cast should do justice in depicting this situation.

screen2

To fix this problem, without messing up the code of mapillary-js, I added a variable which keeps track of the last point clicked on by the user whenever mapillary-js goes into loading mode. This allows me to do cool things like show loading and keep the system stable and predictable. After fixing this here is the screen cast showcasing the awesome blip.

blip

So this was all about mapillary-js and its humble addition to iD. Apart from that iD is soon going to get this huge internal makeover by splitting the code into modules. Now, this is an architectural shift. Doing this will make way for easy development of iD. Head over to this ticket for any updates regarding this.

Discussion

Log in to leave a comment