[OSM-dev] Trial clickable POI layer
david at frankieandshadow.com
Fri Sep 21 22:02:19 BST 2007
On 21/09/2007 21:39, Jon Burgess wrote:
> One of the problems with HTML is that it mixes content and
> layout/rendering information. For example, instead of returning
> something like:
> <Name>The Ivy</Name>
> in HTML we might get:
> <IMG href="images/restaurant.png" />
> <A href="http://www.the-ivy.co.uk">The Ivy</A>
That wasn't at all what I was proposing: see my previous mail.
> The latter may be simpler for PC browsers to display, but we'd have to
> 'scrape' the IMG tag to get the fact that this is a restaurant. In
> addition icon specified by the HTML might not be suitable to display on
> the screen of the device making the request.
> Even for the PC browser cases, knowing the list of POIs being returned
> with no HTML parsing is great for displaying a list of enable/disable
> tick boxes to selectively display the POIs etc.
> I guess I don't see what advantage you get from serving HTML instead of
Something has to generate the HTML for display. That can either by JS at
the browser or a script on the server (which may serve cached HTML). I
was proposing doing this on the server because I expected OpenLayers
would have the ability to use HTML as well as images as its tile
sources. Apparently it doesn't. But if it did, the HTML would just slot
in, otherwise there would have to be a callback on the data obtained to
convert it to DOM/HTML. Yes, you could do that but I don't see the point
of this added complexity when the application doesn't need it.
If you want to make the kind of query you envisage, in some other
application, you already have two options: use the API, or use the name
finder. Why overcomplicate map rendering to support a new XML structure,
when you've already got two that would support the mythical future
application you're looking at?
Anyway, this is a pointless discussion at present because it seems that
OpenLayers doesn't support HTML tiles.
More information about the dev