This repository contains a map view that draws GeoJSON features directly on a SWT canvas. We will probably use this for regionalization features in openLCA. It supports multiple layers, zooming, dragging, colors etc. it depends only on SWT and the GeoJSON implementation of the olca-geo module.
Basic map layers for water, land, and country borders can be added via
addBaseLayers
:
MapView map = new MapView(parent);
map.addBaseLayers();
FeatureCollection watersheds = ... ;
Composite parent = ...;
MapView map = new MapView(parent);
map.addLayer(watersheds);
map.addLayer(watersheds)
.fillScale("Annual non-agri");
MapView map = new MapView(shell);
map.addLayer(berlinDistricts)
.center(); // center the map around this layer
map.addLayer(berlinBlocks)
.fillColor(grey);
map.addLayer(berlinStreets)
.fillColor(red)
.borderColor(red);