Closed Raruto closed 1 year ago
@hupe13 let me know.
The error is gone, but I don't see both on my test page and on your example the marker .
Check this out now and also check out the other examples with this change because it's quite likely that something else could be broken..
I went through my test pages and didn't find any errors because of this, but I found some errors in my application. Your example works, but there is a warning that leaflet-rotate is missing. What should I look for that might be broken?
there is a warning that leaflet-rotate is missing.
What should I look for that might be broken?
Vanilla JS and Leaflet JS are not to able clone (or merge) complex data structures (eg. nested objects and instances of classes), that's why we needed to add a deep clone algorithm for the default options (eg: to fix https://github.com/Raruto/leaflet-elevation/issues/238#issuecomment-1493826767).
// GOAL: merge "foo.bar.a" and "foo.bar.b" attributes --> { foo: { bar: { a: 'some value', b: 'another value'} } }
const foo_bar_a = { foo: { bar: { a: 'some value'} } };
const foo_bar_b = { foo: { bar: { b: 'another value'} } };
const leaflet_result = L.extend({}, foo_bar_a, foo_bar_b);
const native_result = Object.assign({}, foo_bar_a, foo_bar_b);
console.log(leaflet_result.foo.bar); // LOGS: { b: 'another value'}
console.log(native_result.foo.bar); // LOGS: { b: 'another value'}
So, taking a quick look, these are some options that I think might break:
I went through my test pages and didn't find any errors because of this, but I found some errors in my application.
I don't think I understand what you mean..
I went through my test pages and didn't find any errors because of this, but I found some errors in my application.
I don't think I understand what you mean..
I found some errors in my code. (My english is not good, I'm using translators.)
Ok, so I merge this pull request and then I release a new version so you can easily test all the latest changes together.
Ref: #252, #253, #254, #256 and #228
Fixes a regression introduced by: https://github.com/Raruto/leaflet-elevation/pull/240
Closes: https://github.com/Raruto/leaflet-elevation/issues/255