[OpenLayers-Users] Bound TMS tile layers to latitude/longitude values

Mike Evans mike at dilignt.com
Tue Aug 19 01:36:35 PDT 2014


Hello,

I use Openlayers to create a TMS layer using a tiled hires image of an
exhibition floorplan.  I want a viewer of the floorplan to be able to
geolocate themselves on the layer when viewing the map on a mobile device.
 To do this, I want to use OpenlLayers.Control.Geolocate to return the
users current position, and then put a marker on the TMS layer
corresponding to the position.

I'm trying to figure out how I can somehow associate global latitude and
longitude values to the bounds of the layer, so that the map knows where to
plot the users position, but I'm not sure how to do this.  Can I somehow
create a custom projection to convert between the TMS and the location
lonlat?  Or are there any other ways to do this?

Any advice gratefully received.

many thanks in advance
Mike
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/openlayers-users/attachments/20140819/ac2e092e/attachment-0001.html>


More information about the Users mailing list