These are some initial experiments that will eventually become a kick-butt online map drawing system:
1. verif-image.php: Uses PHP image functions to make an image verification image. (Ok, this has nothing to do with maps. I just didn't have anywhere else to put it!)
2. map.php: Click on the map. "Or" will move to where you clicked. This uses an image map and reloads the page each time. Rendered obsolete by #3 below. (It also draws a box, but this can easily be taken out. I was just fooling around.)
3. cssmap.php: I didn't like how the above map had to reload the page (slow!), so I decided to do it with a layer and javascript. Instead of the "Or" moving, it's a picture of the moon that I just decided to use on a lark.
This file also contains a call to drawhouse.php, which is an unfinished attempt at #4 below. It uses a great javascript graphics library. Click on the "house" to see it in action (it just draws a line and box inside the house for now, but later it could be easily changed to something more meaningful). (drawhouse.php doesn't work in IE. The background is black rather than transparent.) This code will eventually become PBW's sprite moving arounder part of the map function.
4. rubberband.php: Uses drawmap.php (also used
by map.php) as the background image. I modified drawmap.php also, so it doesn't
work quite the same as it used to in #2 above. (It draws a rectangle also now.)
rubberband.php uses javascript to let the user define a selection in the current
browser document. It then reloads itself with a new background image with the
rectangle the user defined. (It also moves the "Or", but this is not
necessary. Again, I was just fooling around.) Cons: Page reload
slow, and drawing a new box erases the old. We need to do it with layers
and javascript, except then, I don't think I'll be able to erase parts of the
rectangle like I need to (to create opening in the rectangles to represent doorways
and whatnot).
5. randrect.php: Clicking the button undates randrect.png
with a new random rectangle and displays it on the page, all with no browser
reload! Now I just need to combine this with #4 above so that the user can make
the rectangles himself. Transparency still doesn't work in IE. Transparency
now works in IE. (It didn't because IE doesn't support PNG transparency.)
6. mappaint.php: This is the interface for the map-drawing system. None of the controls work yet, but it shouldn't be too hard to make it happen!