There is a map, a bunch of markers on it. Now the card is loaded and through the flask it reacts when to cut down the progress of the dialogue. And the markers are loaded later. How to make so that when the map is moving, the markers that are in this area of ​​the map are loaded? Or tell me how to remove the loading of markers in the progress dialog?

myProgress = new ProgressDialog(this); myProgress.setTitle("Карта загружается"); myProgress.show(); mapFragment.getMapAsync(new OnMapReadyCallback() { @Override public void onMapReady(GoogleMap googleMap) { onMapReady2(googleMap); }}); public void onMapReady2(GoogleMap googleMap) { mMap = googleMap; mMap.setOnMapLoadedCallback(new GoogleMap.OnMapLoadedCallback() { @Override public void onMapLoaded() { myProgress.dismiss(); } }); } 
  • Personally, I did not understand the question, you can track the click on the card. The map viewer has an onMapClick method that returns tap coordinates, you can use it. Also you can always get a visible area at the moment, a zoom, etc. Even knowing it will not be difficult to do what you have in mind, but with the markers I did not understand until the end. - Shwarz Andrei

1 answer 1

ObjectManager will help you. He himself understands which objects to hide and which to show. objectManager

  • If you want to do it with your hands then here is an example: tech.yandex.ru/maps/jsbox/2.1/show_visible_objects - Ivan
  • How does objectManager work with a google map? - Ivan Vovk
  • @ivanVovk, I apologize, did not notice that the question about Google map - Ivan