[mapguide-users] Dinamic Tile Render

Jackie Ng jumpinjackie at gmail.com
Mon Apr 15 03:26:59 PDT 2013


Ok, your requirements are starting to make more sense.

I was going to suggest a possible solution, using MgTileService and image
stitching, but found out that the DPI of tiles is hard-coded to 96 meaning
>96 dpi plots is not possible.

Anyway, if you want to know:

 1. Create a new Map Definition document. Use the existing MgMap to query
all currently visible layers, and write these layers out as new Base Layer
entries. Write out the current MgMap view scale into the finite scale list
so that this Map Definition represents:

 - A tiled map with one base layer group
 - The base layer group containing all your currently visible layers
 - The map has one scale in the finite scale list (your MgMap's current
view)

 2. Save this document out to a new Map Definition resource

 3. MgMap.Create() a new runtime map from the saved Map Definition resource

 4. MgTileService.GetTile() all the applicable tiles from this new MgMap.
You can rip the tile iteration logic from the AJAX viewer or MgCooker.
Stitch together each tile you get back from MgTileService.GetTile() to
assemble your final plot image (how you do this in a memory-efficient manner
is an open exercise, just don't do it all in-memory). The reason I say this
solution won't work for you is that all tiles rendered with
MgTileService.GetTile() are hard-coded to 96 dpi. There's currently no way
to configure this value.

- Jackie



--
View this message in context: http://osgeo-org.1560.x6.nabble.com/Re-Dinamic-Tile-Render-tp5046148p5046917.html
Sent from the MapGuide Users mailing list archive at Nabble.com.


More information about the mapguide-users mailing list