[OpenLayers-Users] Google / Yahoo Geometry transfrom??

Jamo adam.jamison at portbris.com.au
Mon May 3 18:12:15 EDT 2010


I've decided to try and use openlayers for a small project I'm working on ...
basically a little website that users can hover over block of land and get
information.

I'd like to give the user the option of having yahoo maps or even google
maps as the background.

I can get a map with yahoo maps background.

However I can't seem to transform my geometry ... at all (Example of a
single point)...
I thought it would transform my point into EPSG 4236 from EPSG 28356 ?

<script src="OpenLayers-2.8/lib/OpenLayers.js"
type="text/javascript"></script>
    <script src="lib/proj4js-combined.js" type="text/javascript"></script>
...

...
var map = new OpenLayers.Map('map', {projection: new
OpenLayers.Projection("EPSG:4326")});
        var layer = new OpenLayers.Layer.Yahoo("Yahoo");
        map.addLayer(layer);
        map.zoomToMaxExtent();
        map.addControl(new OpenLayers.Control.MousePosition());
        var proj = new OpenLayers.Projection("EPSG:28356");
        map.setCenter(new OpenLayers.LonLat(511500, 6966000).transform(proj,
map.getProjectionObject()), 10);

-- 
View this message in context: http://osgeo-org.1803224.n2.nabble.com/Google-Yahoo-Geometry-transfrom-tp5000481p5000481.html
Sent from the OpenLayers Users mailing list archive at Nabble.com.



More information about the Users mailing list