Now we’re cooking! MgCooker for MapGuide Tile Seeding


The latest preview release of MapGuide Maestro (r3620 currently) comes with a nice little surprise:  a tool for pre-seeding tile caches.  MgCooker can be run from the command line (more on this later), or through the Maestro GUI.  It couldn’t be simpler.  Open up a Map Definition that has a Base Layer Group, highlight the group that you want to cook, and click on the MgCooker icon:

image

In the following dialog, either leave the default of all checked, or choose to only pre-render certain zoom levels of your data, the choice is yours (probably best to start with the smallest scale – in this case 100,000):

image

Then click "Build tiles now" and sit back and watch the tiles cook:

image

Of course, this isn’t practical for a production environment where you would want to batch this operation.  That’s where the second option comes in; clicking on "Save as script" generates a Windows batch file similar to the following that you can script to your heart’s desire:

"C:Program FilesOSGeoMapGuide MaestroMgCookerCommandline.exe" batch
   --mapdefinitions="Library://Samples/Sheboygan/MapsTiled/Sheboygan.MapDefinition"
   --basegroups="Base Layer Group"
   --scaleindex=7
   --mapagent="http://localhost:8008/mapguide/mapagent/mapagent.fcgi"

I have no idea if the MgCookerCommandLine.exe works under Mono, but given that the rest of Maestro seems to work fairly well there I would not be surprised.

Great job Kenneth; this is something we have been sorely missing since MapGuide 1.2, and it’s great to see it as part of Maestro!

-J

Bookmark and Share

Related posts

, ,

  1. No comments yet.