[OpenLayers-Users] Displaying a latitude & longitude grid
Tim Schaub
tschaub at openplans.org
Tue Nov 20 12:41:09 EST 2007
Hey-
Andy Dale wrote:
> Hi,
>
> To provide the user with some feedback as to their current
> position/coordinates with the OpenLayers.Control.MousePosition control,
> and this works well.
>
> However I now have the need to be able to display a grid of
> longitude/latitude lines along with labels, the size of the grid should
> also be configurable based upon the current zoom level.
> I was wondering if openlayers currently has this ability ? If not what
> is the best way to approach this, a shape file of some kind ? or
> actually let openlayers do it with a vector layer with multiple line
> features ?
This is called a graticule. A search for "openlayers graticule" leads
me to a control that Christopher is working on in a sandbox [1]. You
can take a look at the example to see if it's close to what you're
talking about [2].
So, with what is in the trunk, you could make your own (following the
code above is advised :) - or you could download that Graticule control
class and try it out (if you're willing to play with work in development).
Tim
[1]
http://trac.openlayers.org/browser/sandbox/crschmidt/grat/lib/OpenLayers/Control/Graticule.js
[2] http://dev.openlayers.org/sandbox/crschmidt/grat/examples/graticule.html
>
> Any advice/help is greatly appreciated,
>
> Andy
> !DSPAM:4033,4742dfea56701849620573!
>
>
> ------------------------------------------------------------------------
>
> _______________________________________________
> Users mailing list
> Users at openlayers.org
> http://openlayers.org/mailman/listinfo/users
>
>
> !DSPAM:4033,4742dfea56701849620573!
More information about the Users
mailing list