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

Zac Spitzer zac.spitzer at gmail.com
Wed Oct 22 08:37:07 EDT 2008


you need to change the settings for the extents, the tempScales and under params
both the mapdefinition, basemaplayergroupname

are there any javascript errors?

On Wed, Oct 22, 2008 at 3:31 AM, gingerbbm <stuart.jones at jacobs.com> wrote:
>
> 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.
>
> _______________________________________________
> mapguide-users mailing list
> mapguide-users at lists.osgeo.org
> http://lists.osgeo.org/mailman/listinfo/mapguide-users
>



-- 
Zac Spitzer -
http://zacster.blogspot.com (My Blog)
+61 405 847 168


More information about the mapguide-users mailing list