Bart, Yes, it is. I am new to openlayers and I didn't realize that the latlong actually returning my own coordinates until my client brought that to my notice. A change in the function name would help a lot of other people and thanks for that. 'll have a look at the examples for transforms.
Cheers, Kalyan On Fri, Oct 8, 2010 at 5:23 PM, Bart van den Eijnden (OSGIS) < bart...@osgis.nl> wrote: > What you are getting is coordinates in your map's projection, so probably > EPSG:900913. LonLat is a confusing term, it should be Location, which will > be done in OL 3.0. > > If you want actual lat/lon values, you need to transform them. Check out > examples/filter-strategy.js for an example on how to transform a LonLat. > > Best regards, > Bart > > > Hello List , > > > > I have my map defined as below > > > > *var map = new OpenLayers.Map('map', {* > > * maxExtent: new OpenLayers.Bounds(-638480920.244, > > -188017611.367, 665489491.580, 1019789790.73),* > > * maxResolution: 10000000* > > * });* > > > > > > I am using a WMS service and the coordinate I am using is > > > > *crs=sw:nsw_trans_mercator_mm* > > > > Now, the problem is, I am getting a latlong value which is too far > > different > > from the actual latlong values. I used the available function*var lonlat > = > > this.map.getLonLatFromPixel(xyCoords) *whree xyCoords are the pixel > > coordinates of my selection. The value it returned is *509754285.668 , > > 402136089.6815 . *I got these values when I placed a point around Sydney. > > I > > don't think these are the actual coordinates. > > > > Could some one tell me what's went wrong or what needs to be done to get > > the > > correct lat long information please. > > > > Thanks, > > Kalyan > > _______________________________________________ > > Users mailing list > > us...@lists.osgeo.org > > http://lists.osgeo.org/mailman/listinfo/openlayers-users > > > > >
_______________________________________________ Users mailing list us...@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/openlayers-users