[OpenLayers-Users] change layer style on zooming

Phil Scadden p.scadden at gns.cri.nz
Sun Nov 11 12:23:51 PST 2012


On 11/11/2012 12:33 a.m., Gery wrote:
> one of the nicer things I noticed in your website is that after placing the
> cursor in google satellite the depth (ocean or land) appears with the
> lon/lat position, that one is done with WFS queries?
That is done via google api (Google elevation service). 
OpenLayers.Handler.Hover created on the map, and then a callback added 
to "pause" which calls the elevation service. Use var lonLat = 
this.map.getLonLatFromPixel(e.xy); to get an xy location and if 
necessary, transform it to lat/long.

I am however also using WMSgetFeatureInfo to retrieve height info from 
grids (eg subsurface geology) which would be another way to implement it.

Notice: This email and any attachments are confidential. If received in error please destroy and immediately notify us. Do not copy or disclose the contents.



More information about the Users mailing list