Esempio n. 1
0
 @Test
 public void onPause_shouldEmptyMeMarkers() throws Exception {
   ItemizedLayer<MarkerItem> meMarkerLayer = mapFragment.getLocationMarkerLayer();
   meMarkerLayer.addItem(new MarkerItem("Title", "Description", new GeoPoint(0, 0)));
   mapFragment.onPause();
   assertThat(meMarkerLayer.size()).isEqualTo(0);
 }
Esempio n. 2
0
 @Test
 public void onItemSingleTapUp_shouldNotifyListener() throws Exception {
   ItemizedLayer<MarkerItem> poiLayer = mapFragment.getPoiLayer();
   poiLayer.addItem(new MarkerItem("Title", "Description", new GeoPoint(0, 0)));
   poiLayer.onGesture(Gesture.TAP, new FakeMotionEvent(0, 0));
   assertThat(listener.getIndex()).isEqualTo(0);
   assertThat(listener.getItem().getTitle()).isEqualTo("Title");
 }
Esempio n. 3
0
 private void addLocationDot() {
   if (locationMarkerLayer != null) {
     locationMarkerLayer.removeAllItems();
     locationMarkerLayer.addItem(getUserLocationMarker());
   }
 }