Relative Content

Tag Archive for openlayers

Floating Marker (should be fixed location)

I’ve got a marker/map pin set at what’s supposed to be lat 53.5788686 degrees, long -113.2774829 degrees. It’s supposed to be at the Via Rail terminal in Edmonton, Alberta, Canada (a test case, no other significance). Well, it is — at maximum zoom-in. Otherwise, it’s significantly off the mark.

Get the center (or extent) for an XYZ source in Openlayers

Is is possible to get the center (or extent) of an XYZ source in Openlayers? (I am not talking about getting the center of a view, but obtaining the center of the map defined by the source itself.) The VectorSource does have a getExtent function, but unfortunately XYZ has no such method.

GPX plotting issues with OpenLayers 7

I have a mapping site that plots points on a UK Ordnance Survey map using Openlayers. This has been running fine for years, running OL 7.5.0. Up to this point everything plotted on the map is a point.

openlayers map.getFeaturesAtPixel returning zero features

I have added a layer group (UTM Projection) and OSM.
Map View projection set to 4326. Trying to get features at clicking position but, not getting the features at map.onclick event. Shall I need to assign projection for evt.pixel?