Bing Maps Ordnance survey layer

sfoxona year ago

Hi All!

I'm trying to access the Bing Ordinance Survey layer, without much success. Is there a way to enable it as an option?
This guide here was not helpful, as n changes in the GUI were to be seen: https://www.traccar.org/forums/topic/bing-os-map-layer/#post-44321
Anyone had success that can help?

Anton Tananaeva year ago

We have it as an option in preferences. Is that not working?

sfoxona year ago

The only Bing options I have is Bing Road, Aeriel and Hybrdi. There is an Ordnance survey option in the list, but that seems to the direct from OS so only their open maps.

Anton Tananaeva year ago

What is the difference in the Bing version?

sfoxona year ago

The Bing version has the 'premium topo', which is used my walkers, hikers, and ramblers, whilst the Ordnance Survey free maps is more useful as strictly road maps, or surveying.

Anton Tananaeva year ago

You might be able to use it as a custom map.

sfoxona year ago

Thanks- Something I will look into. Although, Bing uses Quad Key, and I'm not sure how to express that s a custom map

MTa year ago

The OS version that is now part of the default build is actually the OS Mastermap rather than the ones many UK people will be used to for leisure, I renamed the default osmap in our 'useMapStyles.js' file and added in the BingOS map..

useMapStyles.js

added this... (You'll need a bing maps API key though)

{
  id: 'bingOS',
  title: 'Ordnance Survey',
  style: styleCustom({
    tiles: [`https://ecn.t0.tiles.virtualearth.net/tiles/r{quadkey}?g=12276&lbl=l1&productSet=mmOS&key=${bingMapsKey}`],
    maxZoom: 19,
  }),
  available: !!bingMapsKey,
  attribute: 'bingMapsKey',
},

Renamed this one..

{
  id: 'ordnanceSurvey',
  title: 'OS mastermap',
  style: 'https://api.os.uk/maps/vector/v1/vts/resources/styles?key=EAZ8p83u72FTGiLjLC2MsTAl1ko6XQHC',
  transformRequest: (url) => ({
    url: `${url}&srs=3857`,
  }),
  available: true,
},	
sfoxona year ago

Thank you so much for you super response - which directory is useMapStyles.js in?

MTa year ago

Its built in React, so you'll need the source code, make the changes and then compile it.

Check out https://www.traccar.org/build-web-app/

MTa year ago

traccar-web\modern\src\map\core