question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

How to add custom source OSM ?

See original GitHub issue

Hello,

I want to store tiles locally so they can be accessed faster, if not exists I’ll just point on openstreetmap servers to get them.

However I first need to add some custom source and add it as a component. <vl-custom-source></vl-custom-source>

Issue Analytics

  • State:closed
  • Created 5 years ago
  • Comments:6 (2 by maintainers)

github_iconTop GitHub Comments

1reaction
ghettovoicecommented, Jul 28, 2018

Hi @gisIdea, as I know , browser by default doesn’t allow access to the local file system from canvas. You can try to use absolute path like that file://path/to/images/{z}/{x}/{y}.jpg but probably it shouldn’t work with canvas. May be you should ask about local folder support on the OpenLayers official repository, because if it is supported by OpenLayers then VueLayers should also support it.

The easiest way is setup local web server and provided your local folder to it. Then you can you custom url pattern http://localhost/images/cache/satellite/{z}/{x}/{y}.jpg with ol.source.XYZ (with OpenLayers) or vl-source-xyz (with VueLayers)

0reactions
gisIdeacommented, Jul 28, 2018

Ok thanks it works

Read more comments on GitHub >

github_iconTop Results From Across the Web

Customize a Map Style: adding cycleways layer - Geoapify
This tutorial explains OSM vector maps styles and demonstrates how to change map colors, fonts and add new layers, e.g. a cycleways layer....
Read more >
Add Custom Sources - Blue Marble Geographics
From the Add Online Data Layer screen, tap the button at the bottom of the screen to add a new custom online source....
Read more >
howto add custom osm-layer? - Google Groups
It is possible with mapcreator. menu add customlayer. Create a definition, download some tiles, create s .sqlite databases via the menu of mapcreator...
Read more >
Adding a custom data layer to the OSM ID Editor on a private ...
There is an option "Custom Map Data" available, but it is only valid for the current session i.e. after closing the browser tab,...
Read more >
how to add custom online sources - Global Mapper Forum
I can´t add any source... These are the ones I want to add but I don't get it: Bergfex: http://maps.bergfex.at/osm/standard/{z}/{x}/{y}.jpg
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found