[OpenLayers-Users] Graticule and polar projection

Mark Prins mc.prins at gmail.com
Thu Feb 14 08:48:29 PST 2013


it's been a while since I used graticule, but...


2013/2/13 pascal <pascal2833 at gmail.com>

> Hi,
>
> I'm trying to add graticules to maps and for the epsg 4326 projection,
> there
> are not problem.
> But if I do it with a polar projection (north or south), Openlayers doesn't
> draw circles but draw lines to represent latitudes.
> This is my code, what's wrong?
>
> var vector_graticule = new OpenLayers.Layer.Vector(
>         "vector_grat",
>                         {isBaseLayer: false,
>                                  projection: new
> OpenLayers.Projection("EPSG:4326")
>                         });
>
>          graticule_epsgX = new OpenLayers.Control.Graticule ({
>                         intervals: [10, 10, 10, 10, 5, 5, 2, 2, 2],
> //graticule width in degrees
> f(current map zoom levels).
>                         numPoints: 3, // num of points to use in each of
> the graticule lines.
> default: 50.
>

why change this? how do you draw a circle with three vertices in a
cartesian space?


>                         labelled: true,
>                         //labelFormat: 'd',
>                         targetSize: 2000, //Max size of the grid in pixel
> on the map. Default:
> 200.
>

again why change this? 2000 pixels between seems like an awful lot to me.


>                         lineSymbolizer: [{ // Specific syntax. Could be
> apply to in
> vector_graticule, with a "normal" syntax.
>         fillColor: "yellow",
>                 }],
>                         gratLayer: vector_graticule, // To asociate
> graticule to a vector layer
> (necessary to superpose them to wms).
>                 });
>
> Thanks a lot,
>
> Pascal.
>
>
>
> --
> View this message in context:
> http://osgeo-org.1560.n6.nabble.com/Graticule-and-polar-projection-tp5034005.html
> Sent from the OpenLayers Users mailing list archive at Nabble.com.
> _______________________________________________
> Users mailing list
> Users at lists.osgeo.org
> http://lists.osgeo.org/mailman/listinfo/openlayers-users
>



-- 
Disclaimer;
This message is just a reflection of what I thought at the time of sending.
The message may contain information that is not intended for you or that
you don't understand.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/openlayers-users/attachments/20130214/89cd988e/attachment-0001.html>


More information about the Users mailing list