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

Can't make StreetLabels work with contours #14

Open
bkepl opened this issue Nov 4, 2020 · 0 comments
Open

Can't make StreetLabels work with contours #14

bkepl opened this issue Nov 4, 2020 · 0 comments

Comments

@bkepl
Copy link

bkepl commented Nov 4, 2020

Describe the bug
I can't get this plugin to work with contour lines.

To Reproduce
I have uploaded files to test this here: http://cnyrpdb.org/leaflet_test/testing.zip and I uploaded it here.
testing.zip

The file called leaf02.html is my test. I added contour lines (white dashed lines) to an area of the map and I would like to label them with the elevation. When I uncomment the line renderer: contourLabels, //Contour labels (line 103) the layer control at the upper right of the map is no longer visible, and the CSS I applied to the data I added to the map is no longer interpreted.

The file called test.html is your example with my dataset (contours_geojson.js) added. I edited the map location (line 81) to be at my location. You will see that the contours aren't visible at all, and the layer control isn't visible, but when I go back to your original coordinates, the layer control returns.

I also noted that your example includes no <!DOCTYPE html> or other expected HTML elements. When I added <!DOCTYPE html> the map didn't function properly.

I saw that in your example the linked files are to a URL rather than a relative local path, and when I used these URLs in my test, I noted that the file L.LabelTextCollision.js wasn't needed.

So, generally, I'm confused. Any light you could shed on my issues would be very greatly appreciated! This plugin seems to be exactly what I need.

Many thanks,
Bruce

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

No branches or pull requests

1 participant