[OSM-dev] Google Summer of Code project feedback

Komяpa me at komzpa.net
Mon Mar 11 13:17:54 UTC 2013


> About me: I'm a free software enthusiast, I have collaborated with several free
> software projects. I have a strong JavaScript background and try to follow all
> the cutting-edge web technologies. I'm a Mozilla contributor and member of
> Mozilla Hispano.


First things first, Mozilla has the most problematic Canvas of all the browsers.
It has slow font metrics, slow font rasterizing, and has performance
bugs in setting Canvas properties.

> My project consists in improving the Kothic-js library in several ways:

> Performance enhancements:
> * Investigate porting parts of the code to asm.js ( http://asmjs.org/ )
> * Investigate rendering with WebGL: I don't have any experience with WebGL so I
>   don't know if you can expect performance improvements rendering vector data
>   with WebGL instead of canvas for 2d vector data. I'm guessing It could be a
>   great improvement if you could make most of the calculations inside the
>   shader, but I have never written a shader so I have no idea.

Kothic is as easy as "take vectors and put them into canvas", the
slowest part there is browser's Canvas implementation. Chrome managed
to make it ~10x faster since the beginning of Kothic JS, by making it
asynchronuous and using GPU actively.

> Usability enhancements:
> * Render text and icons separately. This allows to hide the labels that are
>   partially out of the viewbox and therefore not legible (but still, taking up
>   space in the map), to show the label of the streets in the currently visible
>   part of the street and to show the labels and icons horizontally in rotated
>   maps, all this without having to discard cache map tiles.

For now Kothic is rather tightly paired to leaflet, and it doesn't
have map rotation support.

> The objective of this is that you can easily make a HTML5 mapping application
> that is fast and responsive even in mobile browsers, and the map doesn't look
> like a "image", but like a more dynamic thing.
> During the development of this project, I also plan to make an Leaflet plug-in
> to add the Kothic-rendered TileLayer that uses aggressive caching of both
> rendered tiles and GeoJSON data, and a custom layer for the rendered text that
> that updates each time the viewbox is changed.

Pull requests welcome :3

> I'll also develop a minimal map application for Firefox OS to have something
> that everybody can use at the end of the project.
> What does everybody think?
> Regards,
> David Bengoa
> _______________________________________________
> dev mailing list
> dev at openstreetmap.org
> http://lists.openstreetmap.org/listinfo/dev

Darafei "Komяpa" Praliaskouski
OSM BY Team - http://openstreetmap.by/
xmpp:me at komzpa.net mailto:me at komzpa.net

More information about the dev mailing list