Giter Site home page Giter Site logo

leaflet-extras / leaflet-providers Goto Github PK

View Code? Open in Web Editor NEW
2.1K 2.1K 658.0 1.12 MB

An extension to Leaflet that contains configurations for various free tile providers.

Home Page: https://leaflet-extras.github.io/leaflet-providers/preview/

License: BSD 2-Clause "Simplified" License

CSS 8.21% HTML 18.96% JavaScript 72.84%
leaflet

leaflet-providers's People

Contributors

abierbaum avatar almccon avatar brunob avatar calvinmetcalf avatar chatelao avatar cquest avatar dependabot[bot] avatar dpix avatar duncmc avatar gcebelieu avatar gutenye avatar jayyx2 avatar jieter avatar jluc avatar kopytjuk avatar kyroskoh avatar martinfleis avatar mcguffin avatar pensierinmusica avatar seelmann avatar simon04 avatar stefanocudini avatar stell avatar stevenheinrich avatar tmwdr avatar tomhughes avatar tyrasd avatar voda avatar ximex avatar zerocrates avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

leaflet-providers's Issues

Change URL for retina

I'd love to be able to adapt the url for retina screens. Nice would be a {retina} option, that will change {format} in the url when on a retina screen and detectRetina is on. E.g. format = .png and retina = @2x.png. Normally {format} will be used, but when high resolution {retina} will overrule.

Does a state-focused WMS fit?

Would you be willing to include a small state's WMS? It's not a "tile" service, and you won't see anything in Europe, since it only covers a state. Wondering if it fits the project - I'm thinking not, but just curious.

diiferent providers have different country boundaries

In places where there is disputed boundaries between different countries, most of the providers don't respect the actual line of control and differ considerably from the openstreetmap boundaries.

All country boundaries from the providers should follow the boundaries of openstreetmap.

Is `L.Provided` really useful enough to keep it?

I've never used it and it's close to 10% of the code size:

Current size:

13924 leaflet-providers.js
 9408 leaflet-providers.min.js
 3074 leaflet-providers.min.js.gz

After removing L.Provided

12538 leaflet-providers.js        (-1386)
 8680 leaflet-providers.min.js    ( -728)
 2831 leaflet-providers.min.js.gz ( -243)

Thoughts @calvinmetcalf, @brunob?

List of previews can't be scroll on tablet browser

Hello !!

On Android tablet, I can't scroll the previews list. It detects the scroll on the map and not on the previews list. I tried to play with the CSS "z-index", "overflow", ect... But it doesn't work. I know the previews implementation is just a demo but i'm not really good in CSS tricks.
(I tried on firefox android, chrome android, default android browser)

It's not really an issue but If someone has an idea to help me... thanks in advance.

(and sorry for my bad english...)

SSL support for MapQuest OSM

I know that MapQuest OSM supports SSL, but the provider URL seems to be hardcoded to 'http', this is triggering mixed-content warnings on my site (which is SSL-only).

Can't seem to get it working

Hello,

I'm trying to use MapBox with Leaflet JS using your this project.

Here is my code:

var map = L.map('map').setView(
    [latitude, longitude],
    13
);

L.tileLayer.provider('MapBox.jamesking56.ligeph22').addTo(map);
L.geoJson(geoJson, {}).addTo(map);

What am I doing wrong? There's no console errors but I just get a blank grey map with my GeoJSON on it (no tiles)

Looking for a new maintainer

I'm not really a talented frontend developer and created leaflet-providers just for fun and for my own usage. I also don't have enough time to pay attention to the pull requests and issues. As some folks seem to like it and use it I think it makes sense to transfer ownership to someone who wants to maintain it, or even better to a group of maintainers. Voluneers please :-)

file naming of js file

Would it be a good idea to rename leaflet-providers-0.0.2.js to leaflet-providers.js so the file in the repository doesn't imply a specific version? I would expect the version number to be tied to the tag in the repository or a specific release, not the source code that everyone is changing.

HERE

here provides "App_Id" and "App_Code".
The README.md talks about "devID" and "appId" (outdated?)

detectRetina not working for NASAGIBS.ViirsEarthAtNight2012

When I use detectRetina: true for NASAGIBS.ViirsEarthAtNight2012 it somehow changes the maxZoom from 8 to 7 which in turn requests the wrong tile URLs (404). Using detectRetina works perfectly for other basemaps like Esri.WorldImagery.

Commonjs / Browserify

With #162, we have AMD support.

Do we need to add:

    // define a Common JS module that relies on 'leaflet'
    } else if (typeof exports === 'object') {
        module.exports = factory(require('leaflet'));
    }

How do we define "FREE"

Hey fellow new maintainers, a question were going to need to answer, how are we going to define a "free tile layer", this has already come up twice #16, #18.

I'd suggest I'd suggest being fairly permissive in how we define "free" as long as we

  • Don't violate TOS, I'm pretty sure loading Google tiles with out loading their library is a No No.
  • Don't pre-populate api keys with working keys. I think mapbox showed us one way to do this, they could have also put in {mapid} to the template string and had the mapid passed in an option object.

Make a gh-pages-page to select a provider

Sometimes it's overkill to include the whole file, but it's nice to let leaflet-providers be a provider repository also usable through a page on GitHub pages.

The page should display small maps of all available layers and some way to select them. The page should then display the Javascript code required to use that provider with a Leaflet map, without the need to include the whole leaflet-providers file.

Any thoughts?

Tiles are not loading from any provider

I cloned the repository and without editing it I uploaded it to my server. When I load the preview the tiles are not showing up. I can see the ui but no tiles. When I look at the google chrome dev tools under the network tab I can see that all file requests to the tile providers simply hang in the pending state. Any idea what's going wrong here?

Basemap.at

Should we also include layers that didn't cover the whole earh?
I need the Basemap.at layer very often (from Austria)
http://basemap.at/

If yes we have to set the bounds, what shouldn't be a problem.

Example:

Basemap: {
      url: '//maps{s}.wien.gv.at/basemap/{variant}/normal/google3857/{z}/{y}/{x}.jpeg',
      options: {
        HTTPS: true,
        attribution: 'Datenquelle: <a href="//www.basemap.at">basemap.at</a>',
        subdomains: ['', '1', '2', '3', '4'],
        bounds: [[46.358770, 8.782379], [49.037872, 17.189532]]
      },
      variants: {
        basemap: 'geolandbasemap',
        bmapgrau: 'bmapgrau',
        bmapoverlay: 'bmapoverlay',
        bmaphighdpi: 'bmaphidpi'
      }
    }

Correct links for OpenMapSurfer layers

At the moment ip address-based links are used. These links contain nonstandard ports, which can be sometimes blocked by a firewall.
Please correct all used links according to the table below:

OSM Roads layer:
URL: http://openmapsurfer.uni-hd.de/tiles/roads/x={x}&y={y}&z={z}
instead http://129.206.74.245:8001/tms_r.ashx?x={x}&y={y}&z={z}
OSM Semitransparent layer:
URL: http://openmapsurfer.uni-hd.de/tiles/hybrid/x={x}&y={y}&z={z}
instead http://129.206.74.245:8003/tms_h.ashx?x={x}&y={y}&z={z}
ASTER GDEM & SRTM Hillshade layer:
URL: http://openmapsurfer.uni-hd.de/tiles/asterh/
instead http://129.206.74.245:8004/tms_hs.ashx?x={x}&y={y}&z={z}
ASTER GDEM contour lines layer:
URL: http://openmapsurfer.uni-hd.de/tiles/asterc/
instead http://129.206.74.245:8006/tms_il.ashx?x={x}&y={y}&z={z}
OSM Administrative Boundaries layer:
URL: http://openmapsurfer.uni-hd.de/tiles/adminb/
instead http://129.206.74.245:8007/tms_b.ashx?x={x}&y={y}&z={z}
OSM Roads Grayscale Layer:
URL: http://openmapsurfer.uni-hd.de/tiles/roadsg/
instead http://129.206.74.245:8008/tms_rg.ashx?x={x}&y={y}&z={z}

usage of provider list

Hi Jan,

I would like to use part of your provider list for our repo qgis2leaf.
Can I do that?

Best regards,

Riccardo

add mapquest aerial tiles

Hi and thanks for this plugin,

What do you think of adding MapQuest Open Aerial tile ? This addin should do the work :

  L.TileLayer.MapQuestOpen.Aerial = L.TileLayer.MapQuestOpen({
    url: 'http://{s}.mqcdn.com/naip/{z}/{x}/{y}.png'
  });

++

npm run test

this command didn't work for me. I think he didn't like the * expression.
Windows 7 x64

npm run test
> [email protected] test C:\############\leaflet-providers
> jshint leaflet-providers.js preview/*.js
ERROR: Can't open preview/*.js

Layers control overlay

For overlays to work on layers control, base[i] may be changed to overlay[i] in the condition at line 459.

License

probably going to want a license for this repo, hadn't noticed there wasn't one, are people ok with the MIT license ? Which I thought was what leaflet was, but I just double checked and I think it's 2 clause bsd.

OpenStreetMap Black and White style getting 404 errors.

Going to the URL for one of these tiles, e.g. a.www.toolserver.org/tiles/bw-mapnik/11/330/790.png
yielded:

--- (excerpts)
We're sorry, but the user-supported tool you have attempted to reach
did not leave a forwarding URL where we could automatically redirect you.

You may find the tool you are looking for, or another similar tool, by consulting the Tool Lab's index of tools.

The Wikimedia Toolserver was a collaborative platform providing Unix hosting for various software tools written and used by Wikimedia editors and operated by Wikimedia Deutschland e.V. It has been replaced by the Wikimedia Labs, with the services that used to be provided by the Toolserver available through the Tool Labs project.

I've been unable to find these tiles in the Tool Labs site, and have been unable to find any info about this with google searches. :(

CDN for leaflet-providers

Hi,

This extension is really nice, thanks for putting it together! Is it available through any CDN? If not, shall we post it on cdnjs?

Cheers :)

Automate release of new versions

Updating the version numbers, creating the tag and publishing to npm (/cdnjs) should be more automated or at least a documented checklist should be available.

mversion can do the bumping and tagging.

Checklist:

  1. Bump version in package.json and bower.json
  2. Commit to master git commit -a -m "Bumping version"
  3. Create an annotated tag: git tag -a -m "tagging version 1.0.x" 1.0.x
  4. Push git push origin master --tags
  5. Checkout gh-pages and pull origin master git checkout origin gh-pages && git pull origin master
  6. Push updated gh-pages git push origin gh-pages
  7. Checkout master git checkout master
  8. npm publish

(Maybe update cdnjs if PR is accepted)

HERE only terrainDay seems to work

I am using a simple map as shown below, with the API keys omitted:

    var map = L.map('map').setView([-29.95315222951503, 24.57483478], 6);

    /*
     HERE.normalGreyDay
     HERE.satelliteNoLabelsDay
     HERE.satelliteYesLabelsDay
     HERE.terrainDay
    */
    L.tileLayer.provider('HERE.terrainDay', {
      app_id: '***',
      app_code: '***'
    }).addTo(map);

Libraries are loaded from:

  <script src="//cdnjs.cloudflare.com/ajax/libs/leaflet/0.7.3/leaflet.js"></script>
  <script src="//cdnjs.cloudflare.com/ajax/libs/leaflet-providers/1.0.7/leaflet-providers.min.js"></script>

However when changing the map variant to any other than the one used in the example from README.md, namely 'HERE.terrainDay', the following message appears to console:

uncaught exception: No such variant of HERE (normalGreyDay)

I assuming that internally the "Map Tile API" is being used, is that correct?
https://developer.here.com/documentation/versions

Clarify license

It would be useful to clarify the license of this repo - it's mostly data so it might be reasonable to declare it's CC0.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.