Now I have jts works in smap, however there are excitement and disappointment.
with:
"POLYGON ((145.0 -37.81, 144.95 -37.8, 144.90 -37.77, 145.0 -37.81)), now I can get:
It looks good , however the javascript size has increased. Chrome told me that now the js size is about 120k. So if I keep using JTS as my base geometry implementation , SMap lib probably will end up with around 150k with all features I planned. it's not too bad for a normal web application but I would try to do better. It will be ideal if I can control the core size to be less than 50k.
Planning to switch back and make JTS as an optional extension. Though Gwt is powerful but I should always leave complex spatial calculation on server side if possible. I believe Gwt is smart - it should only compile class which is directly used. If that's true, I need to keep the 'domain model' thin and keep rich functions to separated classes. In that way, by reduce dependency the unused classes won't be compiled and included in the build. A lib smaller than 10 k will be super cool, that is still my goal. Guess I need to do re factor before moving forward. Yes I need be very careful about dependency.
No comments:
Post a Comment