10.3 Mapping data from a database: Fixing some bugs

Disappearing Markers??

Case #1:

Zoom out of the map.  Keep zooming out…  At some point, you will notice that the map markers disappear!  Why is this?

The fix is to replace the “$statement->prepare” and the “$statement->bindparam” (lines 9-20), with the highlighted lines below. Can you figure out what it is doing, and why it fixes the problem?

Case #2:

While the server side fix seems to have fixed our problem, test the maproom again, and zoom even further out.  At some point, when you see the entire earth in the map view, you may notice that the markers disappear…yet again!  What is going on?

Here is fix for Case #2.  This one is implemented in the maproom code, within the addPublicLayer() function.  Can you figure out what is going on here, and why it fixes the problem?

Leave a Reply