0

When I load map using Mapview, map can be shown,but when operate the map, it is very caton. it is very smoothly when load map with SupportMapFragment. this is my code:

 private void initialize() {
    setContentView(R.layout.activity_main);
    boolean success = com.here.android.mpa.common.MapSettings.setIsolatedDiskCacheRootPath(
            getApplicationContext().getExternalFilesDir(null) + File.separator + ".here-maps",
            "com.here.android.tutorial.MapService");

    if (!success) {
        Toast.makeText(getApplicationContext(), "Unable to set isolated disk cache path.", Toast.LENGTH_LONG);
    } else {
        final MapView mapView = findViewById(R.id.mapview);
        mapView.setVisibility(View.VISIBLE);
        ApplicationContext context = new ApplicationContext(this);
        MapEngine.getInstance().init(context, new OnEngineInitListener() {
            @Override
            public void onEngineInitializationCompleted(Error error) {
                Map map = new Map();
                mapView.setMap(map);
            }
        });
    }      
}

some one who can help me?

Pradip Tilala
  • 1,715
  • 16
  • 24
  • What does "caton" mean? In your second sentence you say it's very smooth, is there a Problem? – JensV Mar 15 '19 at 10:22
  • means need to have a long time to response your operations,smooth means it's very quickly to response your operations – Walt Chang Mar 18 '19 at 01:31
  • You say it's very smooth if you're using a SupportMapFragment. Why aren't you using that then? – JensV Mar 18 '19 at 09:25
  • I want to use the map in react-native project, i need to package a view for react use native code, and react just receive view not fragment . so i need to use mapview to implement this function – Walt Chang Mar 18 '19 at 10:28
  • https://stackoverflow.com/a/48573889/2232127 – JensV Mar 18 '19 at 15:23

0 Answers0