-
Notifications
You must be signed in to change notification settings - Fork 32
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
Graticule integration #52
Graticule integration #52
Conversation
Hi, Mridul - when it's running, can you push a copy to your gh-pages branch too so we can try it out? Thanks! |
This is looking really good. We need to make a couple follow up issues:
Thank you, Mridul!!! This is great progress. |
I don't find it on npm I tried earlier as well that's why we need it in source, also we will be altering the code for graticulate, thus we need it anyways. |
So you can link to a URL in package.json --
https://stackoverflow.com/questions/17509669/how-to-install-an-npm-package-from-github-directly
And if we need to make changes, we should fork it and submit PRs over there
-- what changes do you need to make? I can help think through what should
be in our library and what in theirs.
If we fork, we can point our package.json towards our fork until they
accept our PR ;-)
…On Mon, Jul 3, 2017 at 5:19 PM, Mridul Nagpal ***@***.***> wrote:
I don't find it on npm I tried earlier as well that's why we need it in
source, also we will be altering the code for graticulate, thus we need it
anyways.
—
You are receiving this because you commented.
Reply to this email directly, view it on GitHub
<#52 (comment)>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/AABfJ7ewji-r-c8Gwt_4uCxBdMy6CELRks5sKVrFgaJpZM4OMqlJ>
.
|
I think this is only appllicable to npm packages that are registered and this one is not. I am getting several errors. I tried all of the solutions on that page |
Can you post what you tried? I'm sure this works without npm registration; see how the PublicLab.Editor is doing this: https://github.com/publiclab/PublicLab.Editor/blob/master/package.json#L28 I had to fork and adjust that library, so i linked directly to the URL of my modded fork, specifying a branch with |
Try adding this to "leaflet-graticule": "git://github.com/Leaflet/Leaflet.Graticule.git#master" then run |
Ack! it's because it's But also it needs a package.json -- so i forked, opened a new branch & PR, and you can now:
until they accept my PR: Leaflet/Leaflet.Graticule#1 |
My bad, corrected this |
// | ||
// expect(blurredLocation.gridSystem.getCellSize().rows).toBe(72.8); | ||
// expect(blurredLocation.gridSystem.getCellSize().cols).toBe(118.3); | ||
// |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is there a way to write a test for this? Or shall we just depend on Graticule? I'm not sure, does Graticule have tests?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think we will have to depend on graticule for that
src/blurredLocation.js
Outdated
}; | ||
|
||
options.zoom = options.zoom || 6; | ||
options.map = options.map || new L.Map('map',{zoomControl:false}).setView([options.location.lat, options.location.lon], options.zoom); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can you break this up onto multiple lines? For readability.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Sure thing
src/blurredLocation.js
Outdated
lat: 41.011234567, | ||
lon: -85.66123456789 | ||
}; | ||
var stamenTerrain = L.tileLayer("https://a.tiles.mapbox.com/v3/jywarren.map-lmrwb2em/{z}/{x}/{y}.png").addTo(options.map); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hmm, why this name? Maybe something more generic, like tileLayer?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It was just a default, will change to tileLayer
src/core/gridSystem.js
Outdated
function addGrid() { | ||
layer = L.latlngGraticule({ | ||
showLabel: true, | ||
zoomInterval: [ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is this repeated? Maybe use an options parameter?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Done
Done Please have a look. |
Great!!! |
No description provided.