Kim's idea is so simple and smart:
Here's my tip for keeping toddlers from walking out onto the street or parking lot unsupervised. It relies on the good old "neutral third party" idea. Just tell them it's a universal rule that they always have to hold an adult's hand when they walk on "the black street." In our town, almost all parking lots are black with white lines. So, when the child is lifted out of the car, they can stand on the white line and walk along the side of our car, but may not venture off it until an adult holds their hand. Similarly, when you're walking down the sidewalk and encounter a cross street, they will stop and reach for your hand before stepping onto the black street. My son just turned four and this has been working flawlessly for us since we started when he was about 18 months. After he got used to it, he just naturally reaches up for my hand now and absolutely will not venture onto the black street, even if his ball rolls onto it!
When we visited the volcano in Hawaii, we parked and had to walk along an old closed road that was covered in lava at the end. No cars were allowed between the park ranger station and the lava, but my son still insisted we couldn't possibly walk on the black part without holding hands!