Published by breki on 13 Nov 2008 at 09:03 pm
Kosmos 2.3 – now with integrated slippymap!
UPDATE: A bug has already been discovered thanks to StefanB… a new download link for the fixed version.
There were some comments from this blog’s readers about me not delivering new Kosmos versions as promised
. So I decided to wrap up everything and produce a new version as soon as possible. Some things I planned for this release are postponed to the next version(s).
Last two to three weeks my main effort was in implementing the slippymap (web map) integrated directly into the main map. You can now view the whole Earth using one of OSM’s web maps (Mapnik, Osmarender, CycleMap). I find this to be a much better solution than opening an extra Web map browser window and then fiddling with map buttons like it was in previous versions. That’s why I plan to remove web map browser from Kosmos in future versions (unless some users find it useful, please let me know).
You can set the transparency of web map tiles so you can combine Kosmos rendering of OSM data together with the tiles. The slippymap tiles are also rendered on exported bitmaps and Kosmos’ web map tiles. I haven’t been able to show them on printed pages though, I have to investigate this further.
Icons can now be placed on areas:
Kosmos GUI now has a Full Map Mode switch which, when turned on, maximizes the map display and hides all other windows (see the screenshot at the top of the page). There is also a new Reload Rendering Rules menu item (and hotkey) to ease experimenting with rendering rules.
Another improvement is in Kosmos’ performance (both speed and memory-wise). I already wrote something about it in September. Anyway, you should be able to load larger chunks of OSM data now.
Below is a list of other new features and bugfixes for this release. As always, please let me know if you encounter any new bugs. The code base has changed a lot since the last version because of all the new features added to Kosmos, so there is always a chance of catching a bug or two…
- BUGFIX: multiple rule selectors did not work with {{tag|key}} form
- BUGFIX: density parameter for symbols wasn’t handled properly
- generation of SRTM index can now be canceled by the user
- BUGFIX: the generation of SRTM index sometimes hangs, probably due to FTP client command executing too quickly
- when determining map boundaries, data files which are hidden are ignored
- BUGFIX: when showing large bitmaps there are visible white horizontal stripes
- changed the way how the OSM tags are stored in memory (array instead of Dictionary)
- OSM reading code now ignores “created_by” tag – this results in a significant memory savings, since all of the nodes have this tag
- BUGFIX: the map-related menus remained visible when the project was closed
- implemented custom reading and writing of OSM XML files
- various performance optimizations
- BUGFIX: direct URLs for user pages containing rendering rules did not work
- TextLineOffset-ing is now available for Node, AreaCenter and WayCenter text modes
- added “Max zoom factor” setting to limit the allowed zoom level. This is in order to avoid application freezing up on high zooms.
- Kosmos now uses arrays instead of Lists for storing way’s nodes list
- added support for “bounds” osm tag, “bound” is now deprecated
- BUGFIX: Color alpha value in map shading code is now checked not to exceed the allowed range
- added User-Agent header when accessing Web




Keroseno on 24 Nov 2008 at 5:17 #
hi, i have a question, but i don’t know if this is the correct place to do it…
well. i want to know how can i show a base map (like world map) behind tiles. but, when i generate tiles with kosmos.console there is no option tu set background color transparent.
thanks
– Keroseno
breki on 24 Nov 2008 at 18:48 #
Hi Keroseno,
Try setting the alpha-value of the LandBackgroundColor option in rendering rules. Example: instead of LandBackgroundColor=#F8F8F8, set it to #80f8f8f8, this should make the map background color transparent. The same can be done for any of the colors in Kosmos rules. I hope this helps.
Keroseno on 25 Nov 2008 at 20:38 #
Thanks! it works perfect, i changed #AACCCCCC where AA is alpha value 0 to 99 (i think) and CCCCCC is the color. i have setted AA to 00 to make land complete transparent.
thanks again!
and contratulation for Kosmos software!
Ben on 13 Jan 2009 at 20:29 #
Hi, Thanks a lot for making Kosmos; can’t describe how awesome it is to be able to render my own maps so easily.
I have a problem though, and I’m wondering if you could help. Is there a way to render many things off of one way? e.g. if there is one way tagged highway=unclassified. Could I separately render the core, then the casing, then if I wanted, a second bigger core, and a second bigger casing. Just a made up example.
Also, is it possible to set a width for the casing? Currently “width” seems to vary the core, but not the casing.
thanks, Ben
breki on 13 Jan 2009 at 20:55 #
Hi Ben,
By casing I assume you refer to the line border?
Theoretically you can have as many templates for the single rule as you like. So what you described could be achieved by two Polyline templates, with one template drawing over the other one.
If you take a look at the http://wiki.openstreetmap.org/wiki/Kosmos_Rendering_Help#Polyline_Template_Parameters, you’ll see that the “# BorderWidth: the width of the polyline border, entered as a percentage of the Width”, so if you set the higher percentage, the border will be wider.
I hope this helps.
Ben on 13 Jan 2009 at 21:22 #
Weird, I tried borderwidth as it seemed intuitive, and it didn’t work. Must have made another error. I’ll try again. Thanks for the quick reply.
For having multiple templates. I did try it, and it seemed to follow one rule rather than both, and I gave up on the assumption it wasn’t yet possible. But as it is, I’ll keep trying things until I get the results I’m after.
Thanks! Ben
breki on 13 Jan 2009 at 21:27 #
Just to make it extra clear: a single rule with multiple templates (for example see “BuildingAny” rule in http://wiki.openstreetmap.org/wiki/Kosmos_General_Purpose_Rules, it uses two templates – Polygon and Text).
zvenzzon on 06 Jan 2010 at 20:24 #
In reply to Keroseno “where AA is alpha value 0 to 99 (i think)”.
It is actually a hexadecimal value between 00 and FF.
With regards,
zvenzzon