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

Add support for Leaflet plugin 'Leaflet.vector-markers' #942

Merged
merged 4 commits into from
Sep 28, 2015
Merged

Add support for Leaflet plugin 'Leaflet.vector-markers' #942

merged 4 commits into from
Sep 28, 2015

Conversation

molehillrocker
Copy link

  • Leaflet.vector-markers is a fork of Leaflet.awesome-markers, but instead
    of PNGs it uses SVGs as markers.
  • Add additional example to the already existing marker examples.

@@ -14,6 +14,7 @@
"dist/angular-leaflet-directive.js"
],
"dependencies": {
"Leaflet.vector-markers": "https://github.com/hiasinho/Leaflet.vector-markers",
Copy link
Contributor

Choose a reason for hiding this comment

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

There are no specific releases?

Copy link
Contributor

Choose a reason for hiding this comment

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

I'd prefer an sha# at least.

Copy link
Author

Choose a reason for hiding this comment

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

I could not find it in the Bower repository, so I used the GitHub URL instead.

I'll add a SHA#.

Copy link
Contributor

Choose a reason for hiding this comment

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

@molehillrocker Perhaps ask if the maintainer would publish it at Bower and/or create version tags at Github? I often find asking working pretty well. ;-)

Copy link
Contributor

Choose a reason for hiding this comment

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

👍

Copy link
Author

Choose a reason for hiding this comment

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

Will try that. 😃

Copy link
Contributor

Choose a reason for hiding this comment

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

@molehillrocker Although, now that I checked, that package already has release tags (latest 0.0.3) and it's also at Bower:

$ bower search vector-markers
Search results:

    leaflet.vector-markers git://github.com/hiasinho/Leaflet.vector-markers.git

(ping @hiasinho)

Copy link
Author

Choose a reason for hiding this comment

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

Oh, I did not try vector-markers solely. I thought packages are registered at Bower with the name that is denoted in the bower.json file.

Just to get it right:

  • You prefer Bower packages over raw GitHub links?
  • You prefer using Git tags over SHA# and SHA# over no version identifier at all?

@nmccready
Copy link
Contributor

Looks good besides comments. Anyway you could come up with some specs to add to markers to make sure a vector marker works . This is more important with not having a release tag attached to the bower.json.

@molehillrocker
Copy link
Author

I'm some kind of a noob in the JavaScript world, by 'specs' you mean tests? 😆

@nmccready
Copy link
Contributor

yes test/specs mean basically the same

@@ -32,6 +32,7 @@
"leaflet-tilelayer-geojson": "*",
"Leaflet.utfgrid": "danzel/Leaflet.utfgrid",
"Leaflet.awesome-markers": "*",
"Leaflet.vector-markers": "leaflet.vector-markers#0.0.3",
Copy link
Contributor

Choose a reason for hiding this comment

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

why not

 "Leaflet.vector-markers": "0.0.3",

or

 "Leaflet.vector-markers": "0.0.*",

Copy link
Author

Choose a reason for hiding this comment

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

Bower couldn't load the library when just using the version number, also this is what it saved into the bower.json when using bower install leaflet.vector-markers --save-dev.
But maybe this is a local problem of mine, when the pure version number is supposed to work also? I'll try.

Copy link
Author

Choose a reason for hiding this comment

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

Ah, the library is registered at Bower with all letters written in lowercase. Thus, Bower added the repository name in the value part. I'll fix that.

@nmccready
Copy link
Contributor

Basically LGTM (except bower.json) , but specs would be great as other people will have to maintain this. Basic specs to check for marker creation as a vector is all I am asking for at a minimum.

@molehillrocker
Copy link
Author

Okay, I'll try my best. I've never written tests before in JS or CoffeeScript, so it may take some time to dive into this.

@simison
Copy link
Contributor

simison commented Sep 24, 2015

@molehillrocker take it as a learning challenge. ;-) Remember that if it doesn't work for you, just give heads ups here and we'll help.

@@ -0,0 +1,99 @@
'use strict';
Copy link
Contributor

Choose a reason for hiding this comment

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

👍

@nmccready
Copy link
Contributor

This looks good, but why are so many random commits from other people in this? Should this be rebased? Just trying to make sure we don't lose changes that exist in master.

@simison
Copy link
Contributor

simison commented Sep 27, 2015

Yepp, rebase + squash. @molehillrocker let us know if you need help with that.

@nmccready
Copy link
Contributor

git rebase -i upstream/master

Lars Bischoff added 4 commits September 28, 2015 08:28
- Leaflet.vector-markers is a fork of Leaflet.awesome-markers, but instead
  of PNGs it uses SVGs as markers.
- Add additional example to the already existing marker examples.
- The former dependency to Leaflet.vector-markers was added manually, since
  the package was not found using Bower due to a type in its name... -_-
- Using the proper package name worked.
- Remove the dependency declaration from the dependencies and add it to the
  devDeps only.
- The uppercase L in the library name caused Bower to fail when downloading
  the library. Thus, the GitHub repository was required to be denoted in
  the version part.
- Using the correct library name fixes this problem and allows us to just
  use the version number solely.
@molehillrocker
Copy link
Author

Mmmh I guess I previously mixed fetch/rebase from origin and upstream. Now I rebased onto upstream/master and it looks better, only my commits are there. 😅

@nmccready
Copy link
Contributor

cool

nmccready added a commit that referenced this pull request Sep 28, 2015
…rkers

Add support for Leaflet plugin 'Leaflet.vector-markers'
@nmccready nmccready merged commit 8f0cb1b into tombatossals:master Sep 28, 2015
@molehillrocker molehillrocker deleted the feature/Leaflet.vector-markers branch September 28, 2015 13:37
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.

None yet

3 participants