[OpenLayers-Users] OpenLayers + MapServer + Own maps showing miniature tiles

Henrik Collin hcollin78 at googlemail.com
Mon Feb 15 02:58:05 EST 2010



On Fri, Feb 12, 2010 at 06:14:02AM -0800, Henrik Collin wrote:
>> 
>> I changed the maxExtent and Resolution and it did some good.
>> 
>> This is how it looks now:
>> 
>> maxResolution: 20000,
>> maxExtent: new OpenLayers.Bounds(-20037508.34, -20037508.34, 20037508.34,
>> 20037508.34)
>> 
>> The scale of the map is 1:20000 in meters and that Extent is the max
>> extent
>> of the epsg:2393. 

>    I pretty seriously doubt that.
>
>   http://spatialreference.org/ref/epsg/2393/
>
>In addition, 1:20000 *scale* and 1:20000 resolution are not the same thing.


Ah so true. My bad I actually posted the wrong extent from the code. I have
tried about fifty different Extents. Now the extent is as it was posted in
the spatialreference:

maxExtent: new OpenLayers.Bounds(3050187.8969, 6585228.0377, 3761549.0272,
7803095.3519)


>> It now draws a box into the map with the background color
>> defined in the wms.map and the dots I am drawing are in a correct place
>> in
>> this box. The actual map pictures are still drawn way out of bounds and
>> they
>> are still too small. 

>Because your maxExtent is still totally wrong :)

>> Am I using the maxResolution correctly? And if not how am I able figure
>> out
>> the correct resolution?

>Generally speaking: width of maxExtent / mapWidth (512,256, etc.)


I calculated the resolution to be:

(3761549.0272-3050187.8969)/256 = 2778,754415234375

maxResolution: 2779,

This does not produce any good results either. I think I am missing
something simple... Scale, resolutions settings or something. I am sorry
about these complete newbie questions as this is my first work with
OpenLayers and MapServer.

- Henrik


-- 
View this message in context: http://n2.nabble.com/OpenLayers-MapServer-Own-maps-showing-miniature-tiles-tp4559876p4573338.html
Sent from the OpenLayers Users mailing list archive at Nabble.com.



More information about the Users mailing list