As far as displaying the mouseposition I added this to that code.

if (this.map.projection = "EPSG:900913") {

var v_lonLat = OpenLayers.Layer.SphericalMercator.inverseMercator(lonLat.lon,
lonLat.lat);

lonLat.lon = v_lonLat.lon;

lonLat.lat = v_lonLat.lat;

v_lonLat = null;

}

var digits = parseInt(this.numdigits);

var newHtml =

this.prefix + " Lon: " +

lonLat.lon.toFixed(digits) +

this.separator + " Lat: " +

lonLat.lat.toFixed(digits) +

this.suffix;
Linda

On Jan 14, 2008 10:22 AM, Christopher Schmidt <[EMAIL PROTECTED]>
wrote:

> On Mon, Jan 14, 2008 at 05:35:51PM +0100, O. Baum wrote:
> > I have some polyline data in the format of the geo-coordinates which
> > are used directly in Google Maps (guess they are called "Spherical
> > Mercator"). E.g., a line from (52.50953477032727, 13.38134765625) to
> > (48.850258199721495, 2.35107421875) reaches from Berlin to Paris. Now
> > I want to draw this line on an OpenLayers Vector layer when displaying
> > a Google Maps layer and switched to Spherical Mercator like described
> > in http://trac.openlayers.org/wiki/SphericalMercator.
> >
> > I suppose then this one of your proposals is the correct solution, is
> it?
>
> Yep.
>
> > > If you mean "How can I create features programatically using data in
> > > geographic coordinates", the answer is that you will (in trunk) create
> > > them, then, once your features are created, call
> > > feature.geometry.transform(new OpenLayers.Projection("EPSG:4326"), new
> > > OpenLayers.Projection("EPSG:900913")), before you add your features to
> > > the map.
>
> Regards,
> --
> Christopher Schmidt
> MetaCarta
>  _______________________________________________
> Users mailing list
> [email protected]
> http://openlayers.org/mailman/listinfo/users
>



-- 
Linda Rawson
_______________________________________________
Users mailing list
[email protected]
http://openlayers.org/mailman/listinfo/users

Reply via email to