use of ol.geom.Geometry in project gwt-ol3 by TDesjardins.
the class Measure method fireMeasureEvent.
/**
* Fires a measure event.
*/
private void fireMeasureEvent() {
// check if measuring is active and properly set up
if (isActive && (sketch != null) && (listener != null)) {
// get geometry in map projection
Geometry geom = sketch.getGeometry();
if (geom != null) {
// transform it to lat/lon and fire event
Geometry geomLatLon = geom.clone().transform(proj, PROJECTION_LATLON);
listener.onMeasure(new MeasureEvent(geomLatLon));
}
}
}
use of ol.geom.Geometry in project gwt-ol3 by TDesjardins.
the class WktTest method testWktToGeometry.
public void testWktToGeometry() {
injectUrlAndTest(() -> {
String wkt = wktFormat.writeGeometry(createTestFeature().getGeometry());
assertNotNull(wkt);
Geometry geometry = wktFormat.readGeometry(wkt, null);
assertNotNull(geometry);
});
}
Aggregations