[OSM-dev] Trial clickable POI layer

David Earl david at frankieandshadow.com
Fri Sep 21 21:12:28 BST 2007

On 21/09/2007 20:49, Jon Burgess wrote:
> On Fri, 2007-09-21 at 20:48 +0200, Martijn van Oosterhout wrote:
>> On 9/21/07, David Earl <david at frankieandshadow.com> wrote:
>>> But I really think it does need saving: there must be more than 60,000
>>> POIs - unless you are only thinking about specific types, maybe. But
>>> given the HTML is very compact, I think all POIs per tile could be done.
>> To be honest, lets cross that bridge when we come to it. Until I get
>> images for other things that raise the number of POIs it's not worth
>> optimising something that only takes a fraction of a second anyway.
>> Besides, I wouldn't have a clue how to get openlayers to read HTML
>> into tile. That's not currently supported. What is supported is icons
>> with configurable HTML when you click on them...
> IMO it would be much better to use an XML format which you can pump
> through XMLHttpRequest & XML JS DOM tree (or any other XML parse). This
> leaves the door open for other scripts to interpret the data (both JS
> and non-JS).
> For example, I can see a simple PDA or Phone application which could
> list the nearest pub/cafe/hotel etc by doing a POI request based on its
> current location. It could display the results as a text list with phone
> numbers etc without even displaying the map tile. 
> I understand OSMXAPI can do this sort of thing too.

Name finder already provides exactly this interface 

The point here is that HTML can be a drawing format equivalent to an 
image tile, so I thought it would slot in well to the openlayers 
methodology. Apparently though I was wrong there, though, but the 
principle is still sound. XML would require a layer of JS to be invoked 
client side to convert to HTML (DOM) for display (which requires an 
appropriate hook), or at server side on request. The load on the server 
is quite high for rendering maps, so the less it has to do on a tile 
request the better.

The HTML is a simple conversion of the XML you get from the database 
(which would then be cached). So if you want XML, why not just go to the 
database to get it, just as this application does?


More information about the dev mailing list