OS OpenSpace Maps
OS Openspace Maps - not centred on marker (6 posts)

  1. PeteMeredith
    Posted 2 years ago #

    The shortcode: [osmap markers="53.115,-02.546;RACUNDRA at Venetian Marina"] creates a Marker in the correct place but the map is centred at Berwick-upon-Tweed. This seems like a fault or am I missing something. The page is at:



  2. purediamox
    Posted 2 years ago #

    There are 2 undocumented parameters for centering and zooming the map - centre and zoom. These seem to be necessary when only having markers i.e. no gpx file.


    [osmap zoom="6" centre="SH60985437" markers="SH60985437;Snowdon"]

  3. PeteMeredith
    Posted 2 years ago #

    I have tried adding those parameters with no success. The shortcode now reads:

    [osmap centre="53.115000,-2.546000" zoom="4" markers="53.115000,-2.546000;RACUNDRA at Venetian Marina"]

    I think perhaps it is the Lat/Lon that is the problem.

  4. purediamox
    Posted 2 years ago #

    Yes, it looks to be an issue with lat/long. Seems to work fine, but only if both the centre and the markers are grid references

    [osmap centre="SJ6355257675" zoom="4" markers="53.115000,-2.546000;RACUNDRA at Venetian Marina"]

    marker is at correct place, but still centres on Berwick.

    [osmap centre="SJ6355257675" zoom="4" markers="SJ6355257675;RACUNDRA at Venetian Marina"]


    I noticed there is some javascript code to attempt to centre the map, if no centre parameter is supplied, and it obviously does work for GPX. I only need grid references, so I'll not dig further into this.

  5. PeteMeredith
    Posted 2 years ago #

    It seems to work if I put two markers close together. I think the problem is to do with calculating the extent of the map required to show markers / track etc. When the only feature is a single marker the extent is a single point. Still this doesn't explain why it works for grid references.

    I don't have time at the moment to work out how WordPress plugins work and get up to speed with the Javascript, and anyway it may be a problem with the OpenSpace API.

    The problem will go away when I have more data to display.

  6. Adrian
    Posted 2 years ago #

    I have the same problem.
    I'm sure it used to work, but I just noticed that the map is centred on Berwick if I define a single marker using Lat/Long.
    If I change the code to use a grid reference, then it works as expected.

    This one displays OK
    [osmap height="275" width ="275" markers="SU4679925645; Compton and Shawford"]

    This one centres on Berwick
    [osmap height="275" width ="275" markers="51.028274,-1.334045; Compton and Shawford"]

    I used this handy co-ordinate converter

Topic Closed

This topic has been closed to new replies.

About this Plugin

  • OS OpenSpace Maps
  • Frequently Asked Questions
  • Support Threads
  • Reviews

About this Topic