Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support for Leaflet 1.0.1 and added Typescript-Definition #8

Open
wants to merge 13 commits into
base: gh-pages
Choose a base branch
from

Conversation

Schwobaland
Copy link

No description provided.

Copy link
Owner

@ismyrnow ismyrnow left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for the PR getting this working for Leaflet v1!

Ideally, the v1 changes the TypeScript stuff would be separate PRs. The v1 stuff will definitely be merged in, but I expressed some concerns about the TypeScript stuff.


## Thanks

Thanks to @ismyrnow for original version. See [ismyrnow/Leaflet.functionaltilelayer](https://github.com/ismyrnow/Leaflet.functionaltilelayer)
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We can get away without this. If you want to maintain a fork and have it there, that's fine by me, but it's a little redundant in this repo.

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You're right :) first i wanted to fork only - but then .... will delete this.

.replace('{2}', view.tile.column)
.replace('{3}', view.subdomain);

var url = 'http://{s}.tile.osm.org/{z}/{x}/{y}.png'
Copy link
Owner

@ismyrnow ismyrnow Oct 5, 2016

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for bringing in valid tiles (since the mq tiles went away)!

@@ -1,24 +1,27 @@
Leaflet.functionaltilelayer
===========================

For use with Leaflet 1.0.1.
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I might tweak this a bit, to note that an older version is available. You can leave it how it is for now.

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I will add a version number 1.0.0 to package.json. Maybe you could create a tag for 0.7.


this._adjustTilePoint(tilePoint);
var tileUrl = this.getTileUrl(tilePoint);
L.DomEvent.on(tile, 'load', L.bind(this._tileOnLoad, this, done, tile));
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The indentation looks to be incorrect here. Can you adjust it to match the other lines?

"license": "MIT"
"license": "MIT",
"dependencies": {
"@types/leaflet": "^1.0.34"
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is this dependency necessary for people just using the plugin? Shouldn't it be a devDependency?

I want to be sensitive to developers who aren't using TypeScript, which is still the majority of developers. I also don't use TypeScript myself, so I'm not sure what the best route to take is.

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The TypeScript-Handbook suggests to use dependencies: Publishing. But i understand your concerns. I will remove the TypeScript-stuff and maintain this in a fork. I will read about it and maybe create a different pull request.

@Schwobaland
Copy link
Author

Removed all the TypeScript-stuff and fixed the indentation-errors. Please review.

Copy link
Owner

@ismyrnow ismyrnow left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks so much for doing that! This is really great.

Can you remove the .tsconfig file? With that, it should be all set.

I'll tag the current version as well to make it easier for people to use, and publish it to NPM.

"keywords": [
"leaflet"
],
"main": "./src/leaflet.functionaltilelayer.js",
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The relative path that was there previously should have worked. Was it breaking for you in a particular case?

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think my change was TypeScript-related. Reverted this.

@ismyrnow
Copy link
Owner

ismyrnow commented Oct 6, 2016

Don't worry about the branch conflicts. I had added a version to the package.json and tagged it. I can handle merging your PR.

@Schwobaland
Copy link
Author

removed tsconfig. Thanks for merging!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants