[OpenLayers-Users] map.getCenter function question

Nicholas Efremov-Kendall n.e.kendall at gmail.com
Mon Jun 20 16:25:50 EDT 2011


Hi Ian,

That did it!

On Mon, Jun 20, 2011 at 3:21 PM, Ian Turton <ijturton at gmail.com> wrote:

> On 20 June 2011 16:01, Nicholas Efremov-Kendall <n.e.kendall at gmail.com>
> wrote:
> > Hi Andreas,
> > Thanks for the suggestion. With the following code
> > var temp = map.getCenter().transform(new
> > OpenLayers.Projection("EPSG:4326"),map.getProjectionObject());
>
> Try
> var temp = map.getCenter().transform(new
> OpenLayers.Projection("EPSG:900913"), new
> OpenLayers.Projection("EPSG:4326"));
>
> So you transform from your map (900913/Google) to what Twitter wants
> (4326/latlon)
>
> Ian
> --
> Ian Turton
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.osgeo.org/pipermail/openlayers-users/attachments/20110620/bece2f5e/attachment.html


More information about the Users mailing list