> <map src="sample.gif" rect="http://somewhere/something.html 0,0 65,15"
> rect="parent.html 66,0 120,15"
> rect="#TOP 180,0 200,15">
>
> I'm sure there has been some discussion of this in the past, and I'm sorry
> I missed it. Am I laboring under some misconceptions? Are there good reasons
> why the client should not do mapping?
Mainly because you forgot to allow for circles, bitmapped objects, arbitrary
polygons, external spatial indexers, etc. The server can be very flexible
but the client cannot, any finite client side scheme you implement will
not be sufficient. HTML+ defines polygon support with <FIGA> but it isn't
yet implemented anywhere.
I'm sorry, Tony, I should have been more explicit. I use NCSA's
server, and their imagemap program supports rectangles, circles, and
polygons. I should have included all of these objects in my example,
since I think they are sufficient for what I had in mind. Other things
like external spacial indexers, of course, require server-side
mapping support. I'll look at the FIGA spec, and in the mean time, a
better example of what I intended would be:
<A HREF="http://machine/htbin/imagemap/sample">
<img src="sample.gif" ismap
rect="http://somewhere/something.html 0,0 65,15"
circ="parent.html 70,35"
poly="#TOP 180,0 200,0 200,15 190,15">
</A> <P>
My point was not that the server shouldn't support mapping, but that
some *limited* types of mapping are better done by the client. For
example, take relative URL's. They are in the spec, and are useful for
maintaining large documents. It seems reaonable that one be able to
map from an image coordinate to a relative url or named anchor. But to
resolve this URL requires browser context, which is properly the
domain of the client rather than the server.
I think it would be easy to support pass-through mapping, so that
coordinates un-resolved by the client get passed to the server as is
done now. In the example above, if the coord is not in one of the
three specified areas, it gets passed to the server as before. This
would support both relative URL mapping and server-defined
mapping, as well as allowing map interpretations to be controlled to
some degree by the context of which document the map is viewed from.
For example, in one document, a particular coordinate may be mapped by
the server by default, while in another, an "overlayed" mapping
specified in the HTML may take precedent. Just a wish...
There isn't any reason you can't do your own relative path munging in the
server, it has all the information it needs.
The server gets the request "GET /cgi-bin/imagemap/top-line?69,7 HTTP/1.0"
so I'm not sure what it can do to resolve anything. However, I
think I can hack a fix by passing more arguments to the imagemap
program. Forging ahead...
Cheers,
-- wa | Wayne Allen, EINet - [email protected] FAX: (512)338-3897 | MCC/ISD, 3500 West Balcones Center Dr, Austin, Tx 78759 (512)338-3754