demand

Searching for a point on a map

  • To get to this point,
  • Displays the InfoWindow for this point.

The metaphysics phenomenon

Testing the above requirements to zoom in and display infoWindow, a metaphysical phenomenon occurs

  • Infowindow for some dots is displayed.
  • Some will not be displayed.

Solve the train of thought

  1. Thinking. – > fruit
  2. Search engines. – > fruit
  3. View logs. – > fruit
    • Compare the logs that are displayed normally and those that are not displayed abnormally.
  4. Git community search -> fruitless
  5. Debug
    • Infowindow is displayed normally. Only one marker is drawn for the mapped area (I have processed the marker not in this area and will not draw it).
    • Exception does not display InfoWindow. The mapped area contains more than two markers.
  6. Thinking about, only the fourth phenomenon may be caused by the above. Based on past experience and verification. The InfoWinfow of Autonavi or Baidu can only show one at a time.

Look at the key code

Active above performs the following method

So active = false. It will be implemented.

  • If two markers are added successively.
    • The first marker is set to [active = true] to display InfoWindow.
    • Then the second setting [active = false]. Another hideInfoWindow pass will be executed. This may hide the infoWindow on the first map.

To solve