On May 9, 2010, at 5:10 AM, Robert Coup wrote:

> Hey folks,
> 
> On Sun, May 9, 2010 at 12:16 PM, Hermann Kraus <[email protected]> wrote:
>> 
>> As far as I've investigated it so far every click on the map sends a
>> request to Google's servers which contains the point the user clicked at
>> and returns information about the feature at this position (if any).
> 
> Last time i looked at how the Wikipedia layer worked: when the user
> hovers the mouse over a map-tile, a request is sent to load the "hit
> areas" for that map tile. That allows the mouse-cursor to change when
> it's over a hit-area, and for a "hit" to be detected when the map is
> clicked (kicking off the request).

Something I've also observed with Google's "measles maps" (e.g. 
http://teczno.com/s/hr9) is the use of client-side image maps. Each of those 
tiny spots is a hit area, but the spots are not delivered and positioned as 
separate images.


>> I think file based output would be the easiest solution because it can
>> be read by any text editor. (This helps debugging). When this works more
>> formats can be added.
>> 
> 
> My votes would be for a DB table populated with the data
> (sqlite/postgis) and a json text file for each map/map-tile. (ideally
> a JSONP-style file with a pre-specified callback so it can be used
> cross-domain, but we can sort out those details later). Once you have
> the json files and rendered map tiles then the client has everything
> it needs.


There should be a variety of output possibilities here. JSONP for example would 
be hard for a normal JSON library to parse, but useful for a browser-based 
consumer. I recommend shapefile output (every geographic software knows what do 
with them), comma-or-tab-separated values (easy to view any text editor). WKT 
for the area would make sense for the text-based output. I could live without 
XML entirely.

There probably should be two channels of output geometry: image-based output 
where the point coordinates are relative to the top-left corner of the rendered 
image, and geographic output where the point coordinates are given in the SRS 
of the mapnik map.

The interaction between rendered images and tiles is going to be an issue. 
Mapnik does not have any internal concept of tiles, so generally when it's used 
with tilecache or mod_tile, a very large metatile is rendered in one go and 
then sliced up into smaller 256x256 images.

I've not yet really "launched" my Tilestache project (http://tilestache.org) 
but it might be an excellent test bed for the rendering and delivery of 
non-image-based tiles in JSON, JSONP, and other forms. I can commit to 
providing a tile-based output for hit areas to support this GSOC project.

-mike.

----------------------------------------------------------------
michal migurski- [email protected]
                 415.558.1610



_______________________________________________
Mapnik-devel mailing list
[email protected]
https://lists.berlios.de/mailman/listinfo/mapnik-devel

Reply via email to