我在如何输入我的数据库SQLiteDatabaseAssets的纬度和经度时出现问题,这个代码我从谷歌网站获得,我不知道代码如何更改LatLng(-7.963535,112.640756)与订购的字符串按纬度名称和长
public class MainActivity extends Activity implements OnMapReadyCallback {
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_map);
MapFragment mapFragment = (MapFragment) getFragmentManager()
.findFragmentById(R.id.map);
mapFragment.getMapAsync(this);
}
@Override
public void onMapReady(GoogleMap map) {
LatLng malang = new LatLng(-7.963535, 112.640756);
==>> // LatLng malang = new LatLng("it must be get from my database ordered by name");
map.setMyLocationEnabled(true);
map.moveCamera(CameraUpdateFactory.newLatLngZoom(malang, 13));
map.addMarker(new MarkerOptions()
.title("it must be get from my database")
.position(malang));
map.setMapType(GoogleMap.MAP_TYPE_HYBRID);
map.setMapType(GoogleMap.MAP_TYPE_SATELLITE);
map.setMapType(GoogleMap.MAP_TYPE_TERRAIN);
map.setMapType(GoogleMap.MAP_TYPE_NORMAL);
}}
是的,有人可以帮我吗?我很累,找到了代码: - (
我已经在/assets/mydatabase