OpenLayers users

5 messages Options
Embed this post
Permalink
Clinton Papenfus

OpenLayers users

Reply Threaded More More options
Print post
Permalink
Some javascript/style in this post has been disabled (why?)
Hi All,

I would like to know who in Africa is using OpenLayers. I have been using OpenLayers for almost a year and have been battling to get the grid extents for Southern Africa. The ones I am using is -180.0,-90.0,180.0,90.0. That basically gives the grid for the whole of the right half of the Southern Hemisphere, with that, all the tiles as well. Least to say, it is not the most responsive method to use. Any help would be appreciated.

I have been asked if all responses be done via the list and  not directly to my email address.

Clinton Papenfus
0833767083

_______________________________________________
Africa mailing list
[hidden email]
http://lists.osgeo.org/mailman/listinfo/africa
Andrew de Klerk-2

RE: OpenLayers users

Reply Threaded More More options
Print post
Permalink
Some javascript/style in this post has been disabled (why?)

Clinton

 

maxExtent: new OpenLayers.Bounds(15,-35,33,-21)

 

That should give you the extent for Southern Africa. You just need to tweak them should you require more or less of Africa

 

Andrew

 

From: [hidden email] [mailto:[hidden email]] On Behalf Of [hidden email]
Sent: 22 July 2009 09:07 AM
To: [hidden email]
Subject: [OSGeo Africa] OpenLayers users

 

Hi All,

I would like to know who in Africa is using OpenLayers. I have been using OpenLayers for almost a year and have been battling to get the grid extents for Southern Africa. The ones I am using is -180.0,-90.0,180.0,90.0. That basically gives the grid for the whole of the right half of the Southern Hemisphere, with that, all the tiles as well. Least to say, it is not the most responsive method to use. Any help would be appreciated.

I have been asked if all responses be done via the list and  not directly to my email address.

Clinton Papenfus
0833767083

Checked by AVG - www.avg.com
Version: 8.5.392 / Virus Database: 270.13.17/2242 - Release Date: 07/21/09 18:02:00


_______________________________________________
Africa mailing list
[hidden email]
http://lists.osgeo.org/mailman/listinfo/africa
Clinton Papenfus

Re: OpenLayers users

Reply Threaded More More options
Print post
Permalink
Some javascript/style in this post has been disabled (why?)
Thanks Andrew,

I get this error:

Resolution (0.02197265625) is not with 5.0% of the closest grid resolution (0.02734375)


Here is the snippet of the code:

           var mapOptions = {
           maxResolution: 0.703125,
           numZoomLevels: 5,
           projection: new OpenLayers.Projection('EPSG:4326'),
           maxExtent: new OpenLayers.Bounds(15,-35,33,-21)
        };
....
....
....
....
map.zoomToExtent(new OpenLayers.Bounds(16.45189091859184,-34.83305397094182,32.89099103755922,-22.12503003160239));

Clinton

----- Original Message -----
From: "Andrew de Klerk" <[hidden email]>
To: "Africa local chapter discussions" <[hidden email]>
Sent: Wednesday, July 22, 2009 9:12:07 AM GMT +02:00 Harare / Pretoria
Subject: RE: [OSGeo Africa] OpenLayers users

Clinton

 

maxExtent: new OpenLayers.Bounds(15,-35,33,-21)

 

That should give you the extent for Southern Africa. You just need to tweak them should you require more or less of Africa

 

Andrew

 

From: [hidden email] [mailto:[hidden email]] On Behalf Of [hidden email]
Sent: 22 July 2009 09:07 AM
To: [hidden email]
Subject: [OSGeo Africa] OpenLayers users

 

Hi All,

I would like to know who in Africa is using OpenLayers. I have been using OpenLayers for almost a year and have been battling to get the grid extents for Southern Africa. The ones I am using is -180.0,-90.0,180.0,90.0. That basically gives the grid for the whole of the right half of the Southern Hemisphere, with that, all the tiles as well. Least to say, it is not the most responsive method to use. Any help would be appreciated.

I have been asked if all responses be done via the list and  not directly to my email address.

Clinton Papenfus
0833767083

Checked by AVG - www.avg.com
Version: 8.5.392 / Virus Database: 270.13.17/2242 - Release Date: 07/21/09 18:02:00


_______________________________________________ Africa mailing list [hidden email] http://lists.osgeo.org/mailman/listinfo/africa

_______________________________________________
Africa mailing list
[hidden email]
http://lists.osgeo.org/mailman/listinfo/africa
Tim Sutton

Re: OpenLayers users

Reply Threaded More More options
Print post
Permalink
Hi Clinton

Off the top of my head I believe you can just leave out the max resution option completely and openlayers will by default use a useable value. I can verify this later when I get back to a computer...


Regards

Tim
Sent via my BlackBerry from Vodacom - let your email find you!

-----Original Message-----
From: Clinton Papenfus <[hidden email]>

Date: Wed, 22 Jul 2009 09:47:51
To: Africa local chapter discussions<[hidden email]>
Subject: Re: [OSGeo Africa] OpenLayers users


_______________________________________________
Africa mailing list
[hidden email]
http://lists.osgeo.org/mailman/listinfo/africa


_______________________________________________
Africa mailing list
[hidden email]
http://lists.osgeo.org/mailman/listinfo/africa
Andrew de Klerk-2

RE: OpenLayers users

Reply Threaded More More options
Print post
Permalink
Yep - it all amounts to how you set your zoom levels in openlayers:

http://trac.openlayers.org/wiki/SettingZoomLevels provides a good guide.

We have used the following in the past:

                var options = { maxResolution: "auto",
                'projection':'EPSG:4148',
        maxExtent: new OpenLayers.Bounds(15,-35,33,-21),
        minResolution: 0.000003
        };

-----Original Message-----
From: [hidden email] [mailto:[hidden email]]
On Behalf Of [hidden email]
Sent: 22 July 2009 10:08 AM
To: Africa local chapter discussions
Subject: Re: [OSGeo Africa] OpenLayers users

Hi Clinton

Off the top of my head I believe you can just leave out the max resution
option completely and openlayers will by default use a useable value. I can
verify this later when I get back to a computer...


Regards

Tim
Sent via my BlackBerry from Vodacom - let your email find you!

-----Original Message-----
From: Clinton Papenfus <[hidden email]>

Date: Wed, 22 Jul 2009 09:47:51
To: Africa local chapter discussions<[hidden email]>
Subject: Re: [OSGeo Africa] OpenLayers users


_______________________________________________
Africa mailing list
[hidden email]
http://lists.osgeo.org/mailman/listinfo/africa


_______________________________________________
Africa mailing list
[hidden email]
http://lists.osgeo.org/mailman/listinfo/africa
Checked by AVG - www.avg.com
Version: 8.5.392 / Virus Database: 270.13.17/2242 - Release Date: 07/21/09
18:02:00

_______________________________________________
Africa mailing list
[hidden email]
http://lists.osgeo.org/mailman/listinfo/africa