Fwd: [MapFish-Users] Print servlet not printing OpenLayers.TMS layer

View: New views
2 Messages — Rating Filter:   Alert me  

Parent Message unknown Fwd: [MapFish-Users] Print servlet not printing OpenLayers.TMS layer

by Mike Totman :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

I originally posted this on the Users list, but it occurred to me that now that I'm looking at developing a solution, perhaps it belong here.  I've tried to edit the original thread back down to the important details.

I'm trying to get MapFish printing to work for a TMS layer in our OpenLayers app.  I know MapFish doesn't currently support TMS layers, and I can't find any other tools that can translate TMS to another format MapFish understands (e.g. WMS), so I'm wondering what it would take for me to add support for TMS to MapFish, at least in a limited way needed for our app? (i.e. something I could develop, as opposed to waiting for a new feature for MapFish.  Presumably I/we would submit the code to MapFish as well)

Or is there a tool that can do the translation/presentation of TMS using WMS so MapFish can print our maps? I've looked at GeoWebCache and GeoMoose but they serve up WMS like TMS, not the other way around.

The application stores the map tiles in its own database and retrieves them by URL using a TMS layer which retrieves the tiles via a custom servlet that responds to URLs encoding the tiles in the zoomlevel/row/column format.  e.g. /app/map/0/0/1.jpg

The map is 2 layers:
1. The TMS map layer
2. The features/points-of-interest overlay layer, which is a Vector layer

The code creating them looks like this:
    var options = {
        maxExtent: new OpenLayers.Bounds(0, 0, mapWidth, mapHeight),
        maxResolution: resolution,
        numZoomLevels: zoom,
        units: 'm', // MapFish (for printing) doesn't understand pixels
        controls: []
    }
   
    map = new OpenLayers.Map('ext-gen43', options);
    tmsLayer = new OpenLayers.Layer.TMS( mapTitle,
        mapUrl, {displayOutsideMaxExtent: false, layername: 'db', serviceVersion: '1.0',  type:'png', isBaseLayer: true} );
    map.addLayers([tmsLayer, layer]);

I'd appreciate any ideas or guidance you could provide.

--
Mike Totman

S P I E K E R   P O I N T   I N C
9675 45 Ave NW Edmonton AB
http://www.spiekerpoint.com

_______________________________________________
Dev mailing list
Dev@...
http://www.mapfish.org/cgi-bin/mailman/listinfo/dev

Re: [MapFish-Users] Print servlet not printing OpenLayers.TMS layer

by Mike Totman :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Is there nowhere to get information on how to develop new layer support for MapFish?  I have been unable to find anything on the mapfish sites, or via Google.  I'd rather not try to develop blind.

On Wed, Oct 21, 2009 at 6:00 PM, Mike Totman <mtotman@...> wrote:
I originally posted this on the Users list, but it occurred to me that now that I'm looking at developing a solution, perhaps it belong here.  I've tried to edit the original thread back down to the important details.

I'm trying to get MapFish printing to work for a TMS layer in our OpenLayers app.  I know MapFish doesn't currently support TMS layers, and I can't find any other tools that can translate TMS to another format MapFish understands (e.g. WMS), so I'm wondering what it would take for me to add support for TMS to MapFish, at least in a limited way needed for our app? (i.e. something I could develop, as opposed to waiting for a new feature for MapFish.  Presumably I/we would submit the code to MapFish as well)

Or is there a tool that can do the translation/presentation of TMS using WMS so MapFish can print our maps? I've looked at GeoWebCache and GeoMoose but they serve up WMS like TMS, not the other way around.

The application stores the map tiles in its own database and retrieves them by URL using a TMS layer which retrieves the tiles via a custom servlet that responds to URLs encoding the tiles in the zoomlevel/row/column format.  e.g. /app/map/0/0/1.jpg

The map is 2 layers:

1. The TMS map layer
2. The features/points-of-interest overlay layer, which is a Vector layer

The code creating them looks like this:
    var options = {
        maxExtent: new OpenLayers.Bounds(0, 0, mapWidth, mapHeight),
        maxResolution: resolution,
        numZoomLevels: zoom,
        units: 'm', // MapFish (for printing) doesn't understand pixels
        controls: []

    }
   
    map = new OpenLayers.Map('ext-gen43', options);
    tmsLayer = new OpenLayers.Layer.TMS( mapTitle,
        mapUrl, {displayOutsideMaxExtent: false, layername: 'db', serviceVersion: '1.0',  type:'png', isBaseLayer: true} );
    map.addLayers([tmsLayer, layer]);

I'd appreciate any ideas or guidance you could provide.

--
Mike Totman

S P I E K E R   P O I N T   I N C
9675 45 Ave NW Edmonton AB
http://www.spiekerpoint.com



--
Mike Totman

S P I E K E R   P O I N T   I N C
9675 45 Ave NW Edmonton AB
http://www.spiekerpoint.com

_______________________________________________
Dev mailing list
Dev@...
http://www.mapfish.org/cgi-bin/mailman/listinfo/dev