thanks for answer for my question. can i ask you another question ? now i want to add button on my activity_main.xml but program read file.map and when i add button it didn't show. how can i add button and show it on map ?
| <org.mapsforge.map.android.view.MapView | |
| android:id="@+id/mapView" | |
| android:layout_width="fill_parent" | |
| android:layout_height="fill_parent" /> | |
but how limit the map so there's no grey area appear on my app when i scroll down/up
mapView.getModel().mapViewPosition.setMapLimit(BoundingBox);
yes i want to limit the map view space on screen. so, only my map appear. on screen and there's no blank space or grey space like picture that i send.
mapView.getModel().mapViewPosition.setMapLimit(BoundingBox);apply plugin: 'com.android.application'
android {
compileSdkVersion 21
buildToolsVersion "25.0.2"
defaultConfig {
applicationId "com.example.ismile05.maps"
minSdkVersion 15
targetSdkVersion 21
versionCode 1
versionName "1.0"
}
buildTypes {
release {
minifyEnabled false
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
}
}
}
dependencies {
compile fileTree(include: ['*.jar'], dir: 'libs')
testCompile 'junit:junit:4.12'
compile 'com.android.support:appcompat-v7:21.0.3'
compile files('libs/mapsforge-core-0.7.0.jar')
compile files('libs/mapsforge-map-android-0.7.0.jar')
compile files('libs/mapsforge-map-0.7.0.jar')
compile files('libs/mapsforge-themes-0.7.0.jar')
compile files('libs/mapsforge-map-reader-0.7.0.jar')
compile files('libs/androidsvg-1.2.2-beta-1.jar')
compile files('libs/mapsforge-map-android-extras-0.7.0.jar')
compile files('mapsforge-map-android-0.7.0.jar')
compile files('libs/vtm-0.7.0.jar')
compile files('libs/vtm-android-0.7.0.jar')
compile files('libs/vtm-android-0.7.0-natives-armeabi.jar')
compile files('libs/vtm-android-0.7.0-natives-armeabi-v7a.jar')
compile files('libs/vtm-android-0.7.0-natives-x86.jar')
compile files('libs/mapsforge-map-android-master-20170308.105247-91.jar')
}
}
dependencies {
compile fileTree(include: ['*.jar'], dir: 'libs')
testCompile 'junit:junit:4.12'
compile 'com.android.support:appcompat-v7:21.0.3'
compile 'org.mapsforge:mapsforge-core:master-SNAPSHOT'
compile 'org.mapsforge:mapsforge-map:master-SNAPSHOT'
compile 'org.mapsforge:mapsforge-map-reader:master-SNAPSHOT'
compile 'org.mapsforge:mapsforge-themes:master-SNAPSHOT'
compile 'net.sf.kxml:kxml2:2.3.0'
compile 'org.mapsforge:mapsforge-map-android:master-SNAPSHOT'
compile 'com.caverock:androidsvg:1.2.2-beta-1'
}
Marker markerHydrant = Utils.createMarker(this, R.drawable.marker_hydrant,new LatLong(cn.getLatitude(),cn.getLongitude()));
layers.add(markerHydrant);
and this code on onStart()LocationMarker(mapView.getLayerManager().getLayers()); now, i want to remove these marker.