Skip to content

Commit b92cd86

Browse files
committed
fix: scale to dpi false
1 parent fe96a61 commit b92cd86

File tree

4 files changed

+5
-12
lines changed

4 files changed

+5
-12
lines changed

android/src/main/java/com/osmdroid/OsmMapFileTile.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -42,12 +42,12 @@ public OsmMapFileTile(Context context) {
4242
@Override public void addToMap(MapView map) {
4343
setupMapProvider(map);
4444
map.setUseDataConnection(false);
45-
map.setTilesScaledToDpi(true);
45+
map.setTilesScaledToDpi(false);
4646
}
4747

4848
@Override public void removeFromMap(MapView map) {
4949
map.setTileSource(TileSourceFactory.DEFAULT_TILE_SOURCE);
50-
map.setTilesScaledToDpi(true);
50+
map.setTilesScaledToDpi(false);
5151
}
5252

5353
@Override public Object getFeature() {

android/src/main/java/com/osmdroid/OsmMapUrlTile.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -80,12 +80,12 @@ public Object getFeature() {
8080
public void addToMap(MapView map) {
8181
final ITileSource tileSource = new OsmMapTileSource( "OsmMapTileSource", (int)minimumZ, (int)maximumZ, 256, urlTemplate);
8282
map.setTileSource(tileSource);
83-
map.setTilesScaledToDpi(true);
83+
map.setTilesScaledToDpi(false);
8484
}
8585

8686
@Override
8787
public void removeFromMap(MapView map) {
8888
map.setTileSource(TileSourceFactory.DEFAULT_TILE_SOURCE);
89-
map.setTilesScaledToDpi(true);
89+
map.setTilesScaledToDpi(false);
9090
}
9191
}

android/src/main/java/com/osmdroid/OsmMapView.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -111,7 +111,7 @@ public boolean onScroll(MotionEvent e1, MotionEvent e2, float distanceX,
111111

112112
eventDispatcher = reactContext.getNativeModule(UIManagerModule.class).getEventDispatcher();
113113
this.setTileSource(TileSourceFactory.DEFAULT_TILE_SOURCE);
114-
this.setTilesScaledToDpi(true);
114+
this.setTilesScaledToDpi(false);
115115
this.setTilesScaleFactor(1);
116116
this.getZoomController().setVisibility(CustomZoomButtonsController.Visibility.NEVER);
117117
}

example/src/App.tsx

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -35,13 +35,6 @@ export default function App() {
3535
ref={mapRef}
3636
style={styles.container}
3737
initialRegion={initialRegion}
38-
onRegionChange={async () => {
39-
const camera = await mapRef.current?.getCamera();
40-
console.log(
41-
'🚀 ~ file: App.tsx:40 ~ onRegionChange={ ~ camera:',
42-
camera
43-
);
44-
}}
4538
>
4639
<Marker
4740
coordinate={{

0 commit comments

Comments
 (0)