[mapguide-users] Zac's tile seeder with British National Grid

gingerbbm stuart.jones at jacobs.com
Tue Oct 21 12:31:36 EDT 2008


Dear all

I got Zac's tile seeder working with Sheboygan using both of the following:

http://trac.osgeo.org/mapguide/attachment/wiki/CodeSamples/Tiles/TileCacheSeeding/mapguide_tile_seeder.html
http://trac.osgeo.org/mapguide/attachment/wiki/CodeSamples/Tiles/TileCacheSeeding/mapguide_tile_seeder.html 

http://trac.osgeo.org/mapguide/attachment/wiki/CodeSamples/JavaScript/OpenlayersExample/sheboygan.php
http://trac.osgeo.org/mapguide/attachment/wiki/CodeSamples/JavaScript/OpenlayersExample/sheboygan.php 

But I can't convert either to work with my tiled map using British National
Grid coordinates.

I've changed my Bounds like this:

    var extent = new OpenLayers.Bounds(302000,370000,375000,410000);

I've tweaked the mapOptions thus:

    var mapOptions = {
        ...
        units: 'm',
        projection: 'EPSG:27700',
        ...
    };

And I added these lines (as stated 
http://zacster.blogspot.com/2008/08/tiny-little-openlayers-mapguide-fusion.html
in Zac's blog ):

    var metersPerUnit = 111319.4908;  //value returned from mapguide
    var inPerUnit = OpenLayers.INCHES_PER_UNIT.m * metersPerUnit;
    OpenLayers.INCHES_PER_UNIT["dd"] = inPerUnit;
    OpenLayers.INCHES_PER_UNIT["degrees"] = inPerUnit;

I'm suspicious about the hard-coded tempScales values. As I have no previous
experience with OpenLayers, perhaps there's something obvious I've not done.

Any ideas, anyone?

Thanks
Stuart
-- 
View this message in context: http://n2.nabble.com/Zac%27s-tile-seeder-with-British-National-Grid-tp1360223p1360223.html
Sent from the MapGuide Users mailing list archive at Nabble.com.



More information about the mapguide-users mailing list