Search in sources :

Example 21 with AiLatLng

use of org.activityinfo.shared.report.content.AiLatLng in project activityinfo by bedatadriven.

the class PPTMapRendererTest method createMap.

private MapReportElement createMap(BaseMap baseMap) {
    MapContent content = new MapContent();
    content.setBaseMap(baseMap);
    content.setCenter(new AiLatLng(-0.07965085325106624, 29.326629638671875));
    content.setZoomLevel(10);
    content.setIndicators(Collections.EMPTY_SET);
    content.setMarkers(Collections.EMPTY_LIST);
    MapReportElement element = new MapReportElement();
    element.setContent(content);
    element.setWidth(1022);
    element.setHeight(634);
    return element;
}
Also used : MapReportElement(org.activityinfo.shared.report.model.MapReportElement) MapContent(org.activityinfo.shared.report.content.MapContent) AiLatLng(org.activityinfo.shared.report.content.AiLatLng)

Example 22 with AiLatLng

use of org.activityinfo.shared.report.content.AiLatLng in project activityinfo by bedatadriven.

the class TileMathTest method inverse.

@Test
public void inverse() {
    AiLatLng latlng = new AiLatLng(15, 30);
    Point px = TileMath.fromLatLngToPixel(latlng, 6);
    AiLatLng inverse = TileMath.inverse(px, 6);
    assertThat("longitude", inverse.getLng(), equalTo(latlng.getLng()));
    assertThat("latitude", inverse.getLat(), closeTo(latlng.getLat(), 0.0001));
}
Also used : AiLatLng(org.activityinfo.shared.report.content.AiLatLng) Point(org.activityinfo.shared.report.content.Point) Test(org.junit.Test)

Aggregations

AiLatLng (org.activityinfo.shared.report.content.AiLatLng)22 Point (org.activityinfo.shared.report.content.Point)10 PointValue (org.activityinfo.shared.report.model.PointValue)7 ArrayList (java.util.ArrayList)6 SiteDTO (org.activityinfo.shared.dto.SiteDTO)6 Cluster (org.activityinfo.server.report.generator.map.cluster.Cluster)5 MapContent (org.activityinfo.shared.report.content.MapContent)5 Test (org.junit.Test)5 Indicator (org.activityinfo.server.database.hibernate.entity.Indicator)3 Clusterer (org.activityinfo.server.report.generator.map.cluster.Clusterer)3 PieMapMarker (org.activityinfo.shared.report.content.PieMapMarker)3 MapReportElement (org.activityinfo.shared.report.model.MapReportElement)3 PiechartMapLayer (org.activityinfo.shared.report.model.layers.PiechartMapLayer)3 BaseEvent (com.extjs.gxt.ui.client.event.BaseEvent)2 TiledMap (org.activityinfo.server.report.generator.map.TiledMap)2 BubbleMapMarker (org.activityinfo.shared.report.content.BubbleMapMarker)2 MapSymbol (org.activityinfo.shared.report.model.MapSymbol)2 FieldEvent (com.extjs.gxt.ui.client.event.FieldEvent)1 StoreEvent (com.extjs.gxt.ui.client.store.StoreEvent)1 Coordinate (com.vividsolutions.jts.geom.Coordinate)1