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.

Please let LTileLayer support esri-leaflet in tileLayerClass and release new version npm package

See original GitHub issue

Hi, guys. In my work, I use the esri series map as base layer, but url does not support incoming Object, it only allow String, can you change it or add a new props for this features? (the components is LTileLayer) i am change it like this

url: {
    type: [String, Object],
       default: null
   },

If possible, please release a new npm version. The latest version is 2.5.2 released seven months ago. This version of crs cannot be switched in 2.5.2 npm package.json setCrs(newVal, oldVal) { console.log('Changing CRS is not yet supported by Leaflet'); },

Issue Analytics

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

github_iconTop GitHub Comments

1reaction
ghostcommented, Oct 16, 2020

Thank you. This method sounds good. I’ll try it later. Thank you for your answer.

0reactions
mikeucommented, Oct 16, 2020

If possible, please release a new npm version. The latest version is 2.5.2 released seven months ago.

This we can definitely help with, v2.6.0 has now been released!

We use the Esri map published by ourselves, so we can only use Object to pass the value

I am sorry, but I don’t think that we have any plans to modify the public API of this library to accommodate custom code. You should be able to create a custom layer type, or perhaps simply a wrapper around the factory that will let you continue to use LTileLayer.

Does something like this help, for example?

<template>
  <l-tile-layer :options="options" :tile-layer-class="basemapWrapper"/>
</template>

<script>
import { basemapLayer } from 'esri-leaflet'
data() {
  const basemapWrapper = (url, options) => basemapLayer(options);
  return {
    basemapWrapper,
    options: {
      urlTemplate: '' // the esri map url
      options: {} // other options, accepts all options from L.TileLayer.
    }
  }
}
</script>

That way the function passed to :tile-layer-class accepts the two expected parameters, but ignores the first one and calls Esri’s basemapLayer with only the options object.

Read more comments on GitHub >

github_iconTop Results From Across the Web

esri-leaflet - npm
Leaflet plugins for consuming ArcGIS Online and ArcGIS Server services.. Latest version: 3.0.9, last published: 20 days ago.
Read more >
release-please - npm
Release Please automates CHANGELOG generation, the creation of GitHub releases, and version bumps for your projects. It does so by parsing your ...
Read more >
release-it - npm
Generic CLI tool to automate versioning and package publishing related tasks.. Latest version: 15.6.0, last published: 2 days ago.
Read more >
release-please-example - npm
This will email you a release note and publish a new release. Not able to run GitHub action to publish npm package. Add...
Read more >
Updating your published package version number - npm Docs
Note: If you have linked a git repository to a package, updating the package version number will also add a tag with the...
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