add bulk of openlayers 3 code.