OsmSharp / ui

The UI components.
http://osmsharp.com/
GNU General Public License v2.0
138 stars 90 forks source link

MapCSS improvements, Windows Renderer improvements, etc #148

Closed smitterson closed 9 years ago

smitterson commented 10 years ago

Hi there. Great SDK. Glad to see a full featured open source library that is cross platform.

I've implemented a number of MapCSS properties/styles that were going un-used: font-family, font-style, font-weight, line-cap, various casing properties

A number of these changes required modifying the method signature in Render2D. I've updated the signatures on all the implementations, but only implemented the changes on the Windows UI renderer.

The windows UI renderer is now more complete. It makes use of the font family, style, weight, and line cap now. All graphics objects are now wrapped in using blocks so that they are disposed of.

I've implemented a couple selector types in the CSS Domain parser: OP_NOT_EXISTS, and a few missing comparison selectors. There was also a minor bug in the code-- the less than was using the greater than enum value. I also removed the iOS specific linecap enum values. I replaced them with values specified here: http://josm.openstreetmap.de/wiki/Help/Styles/MapCSSImplementation#Linestyles

Other changes: SQL Server -- added 2 new indexes to improve query performance LayerOsm -- added additional zoom factors for use with making tiles

I realize that this may be a lot of changes--let me know if I should submit this in some other way.

xivk commented 10 years ago

Some great changes in here but a bit big to review and merge... ;) Do you see any way of spltting things up?

I can review this but it will take a while...

xivk commented 10 years ago

I have also seen some breaking changes when using the serialized scene format. Merge will have to wait until after the next release.

Any other things you know of that are missing in the MapCSS implementation? Maybe this can be fixed between the two next releases.

smitterson commented 10 years ago

I can definitely split this up. I didn't realize the pull request was going to be for everything at once. I'll do some googling on how to best handle pull requests.

My bad on the serialization. I'll check on that and fix.

There are some other things missing re: MapCSS. The problem is there are multiple implementations and they're slightly different. JOSM (https://josm.openstreetmap.de/wiki/Help/Styles/MapCSSImplementation) seems to have more properties than the standard MapCSS (http://wiki.openstreetmap.org/wiki/MapCSS/0.2). I'm not 100% sure, but I think the parser will parse all but a few (still marked as TODO in my fork) from the standard MapCSS. I believe the interpreter is lacking the processing of some additional properties--I've not checked on all those yet. I do know that shield support is missing (the renderer may need updates as well). I'll see if I can figure out exactly what is missing.

I was going for the standard MapCSS support with a few items pulled in from the JOSM for label offsets. I've got a MapCSS that is based on an old MapCSS implemenation of the default mapnik style (the openstreetmap style). I'll post that on github later today. I also have some test code I was using to generate tiles for a web-based map.

Would you prefer it if I created issues and submitted pull requests against them?

xivk commented 10 years ago

That's a lot of work.

The tile-generating code is very welcome because I have been meaning to implement this into the odp (https://github.com/OsmSharp/OsmSharpDataProcessor) to generate tiles from an OSM file and MapCSS from the command line.

I have used JOSM as reference because when I started the MapCSS spec seemed a bit out of date. Recently there has been some new movement.

smitterson commented 10 years ago

Ok great--I'll see about working my tile code into the odp.

smitterson commented 10 years ago

Hi, I believe I fixed my breaking changes to the serialization format. I reverted the protomember attributes and placed the newly added fields at the end.

I just posted my mapcss progress here: https://github.com/smitterson/OsmSharp-MapCSS

I'll hopefully get around to posting the tile code this weekend. I'm also planning to see what I can do to break up this pull request. A lot of the changes are related to one another, so I'm not sure what can be done. I could remove my changes to SQLDatasource and other classes that are non-mapcss/rendering related. That would cut down on the changes a little.

xivk commented 9 years ago

Closing this, no more work was done since 2014.