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
- Thinking. – > fruit
- Search engines. – > fruit
- View logs. – > fruit
- Compare the logs that are displayed normally and those that are not displayed abnormally.
- Git community search -> fruitless
- 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.
- 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.