Skip to content

Commit

Permalink
Add osm copyright to maps
Browse files Browse the repository at this point in the history
  • Loading branch information
francoisfds committed Jul 11, 2021
1 parent e60f928 commit 11211e2
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 2 deletions.
4 changes: 2 additions & 2 deletions app/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -28,8 +28,8 @@ android {
applicationId "fr.fdesousa.bikesharinghub"
minSdkVersion 14
targetSdkVersion 23
versionCode 23
versionName "2.0.0"
versionCode 24
versionName "2.0.1"
buildConfigField "long", "BUILD_TIMESTAMP", System.currentTimeMillis() + "L"
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,7 @@
import org.osmdroid.tileprovider.tilesource.TileSourceFactory;
import org.osmdroid.util.GeoPoint;
import org.osmdroid.views.MapView;
import org.osmdroid.views.overlay.CopyrightOverlay;
import org.osmdroid.views.overlay.MapEventsOverlay;
import org.osmdroid.views.overlay.Marker;
import org.osmdroid.views.overlay.infowindow.InfoWindow;
Expand Down Expand Up @@ -120,6 +121,7 @@ protected void onCreate(Bundle savedInstanceState) {
/* handling map events */
MapEventsOverlay mapEventsOverlay = new MapEventsOverlay(this, this);
map.getOverlays().add(0, mapEventsOverlay);
map.getOverlays().add(new CopyrightOverlay(context));

/* markers list */
GridMarkerClusterer stationsMarkers = new GridMarkerClusterer();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,7 @@
import org.osmdroid.tileprovider.tilesource.TileSourceFactory;
import org.osmdroid.util.GeoPoint;
import org.osmdroid.views.MapView;
import org.osmdroid.views.overlay.CopyrightOverlay;
import org.osmdroid.views.overlay.Marker;

import java.text.ParseException;
Expand Down Expand Up @@ -149,6 +150,7 @@ public boolean onMarkerClick(Marker marker, MapView mapView) {
}

map.getOverlays().add(marker);
map.getOverlays().add(new CopyrightOverlay(context));

TextView stationName = (TextView) findViewById(R.id.stationName);
TextView stationEmptySlots = (TextView) findViewById(R.id.stationEmptySlots);
Expand Down

0 comments on commit 11211e2

Please sign in to comment.