-
Notifications
You must be signed in to change notification settings - Fork 43
fix: multiple small bug fixes #1221
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
Open
iBobik
wants to merge
13
commits into
vinayakkulkarni:main
Choose a base branch
from
iBobik:bug-fixes
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from all commits
Commits
Show all changes
13 commits
Select commit
Hold shift + click to select a range
a68738d
fix: updated lock file
iBobik 71ee40c
fix: component names in options to match filenames
iBobik df7dbb0
fix: do not require options because default is enough
iBobik 1c14887
fix: add empty render function to supress warning
iBobik d8ff847
fix: resize map on load
iBobik 27244d2
fix: postpone child components load until map is loaded
iBobik b78c396
fix: check if style is loaded before adding layer
iBobik 9306b4e
fix: do not create popup if not used
iBobik fe2da64
fix: do not require prop because default is enough
iBobik 9b3839f
fix: reactivity for Geojson and Marker
iBobik b58cfac
feat: add build to npm prepare
iBobik c9dd2ef
Merge branch 'main' of https://github.com/geospoc/v-mapbox into bug-f…
iBobik 496feef
style: removed redundant `required` and fixed whitespaces
iBobik File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -26,7 +26,6 @@ | |
| before: { | ||
| type: String as PropType<string>, | ||
| default: '', | ||
| required: false, | ||
| }, | ||
| }, | ||
| setup(props) { | ||
|
|
||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -27,7 +27,6 @@ | |
| before: { | ||
| type: String as PropType<string>, | ||
| default: '', | ||
| required: false, | ||
| }, | ||
| }, | ||
| setup(props) { | ||
|
|
||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -35,7 +35,6 @@ | |
| before: { | ||
| type: String as PropType<string>, | ||
| default: '', | ||
| required: false, | ||
| }, | ||
| }, | ||
| setup(props) { | ||
|
|
||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -34,7 +34,6 @@ | |
| before: { | ||
| type: String as PropType<string>, | ||
| default: '', | ||
| required: false, | ||
| }, | ||
| }, | ||
| setup(props) { | ||
|
|
||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -35,7 +35,6 @@ | |
| before: { | ||
| type: String as PropType<string>, | ||
| default: '', | ||
| required: false, | ||
| }, | ||
| }, | ||
| setup(props) { | ||
|
|
||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -34,7 +34,6 @@ | |
| before: { | ||
| type: String as PropType<string>, | ||
| default: '', | ||
| required: false, | ||
| }, | ||
| }, | ||
| setup(props) { | ||
|
|
||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -34,7 +34,6 @@ | |
| before: { | ||
| type: String as PropType<string>, | ||
| default: '', | ||
| required: false, | ||
| }, | ||
| }, | ||
| setup(props) { | ||
|
|
||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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.
If you've added the
loadedcheck in map, maybe we can refactor this code from all the other files ?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.
based on the issue that is linked it seems that the style can be changed and then the map.value.isStyleLoaded() can return false even when the map was loaded once before. I think leaving this as is in VMarker and other components is safer then dooing it only in VMap component when load event is fired from mapbox.
The use case for this code is when you change the style of the map and then add new marker.
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.
@Buk1m Do you think it would be ok to reload all child components (markers, …) centrally from map when style has changed?
Because this would allow simplify components.
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.
@vinayakkulkarni Could you please tell if I can solve style change by children reload? It will be small performance degradation on style change, but huge simplification of child components.
Thank you for decision. I am going to work on another issues and I will need to merge this, because otherwise I will be forced to commit everything just to my fork and not care about PRs. It is hard to advocate open source contributions to my clients when it will delay fixes and make it more expensive.
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.
Hi @iBobik, sorry for the late message I must have missed the previous notification.
I only worked with mapbox custom styles in a way that styles were loaded at the beginning and never changed, in which case your solution would work. (Un)fortunately you can change them after the map was loaded simply by calling map.setStyle and then
map.value.isStyleLoaded()will return false again.Loading new styles can take a while as it is usually a http request. So if the styles were changed and you will try to add new marker before loading is finished, then you will encounter "Style not done loading" error (At least according to the issue from comment).
There is no way to listen if styles were changed so you can either wrap setStyles method to know when the styles were changed and delay map manipulations until
map.value.isStyleLoaded()return true or stick with the current solution.So the case is:
Keep in mind that the issue is old and I didn't test this exact case myself.
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.
Do you have some idea how to solve it without having this timeout logic in every component?
Is it enough to have own method for style switching what will unload all children for the time of loading?
I am looking for solution what will simplify v-mapbox' codebase, because we are not able to do everything perfectly. In this project's status we have difficulties to push it to the stable state just for basic use-cases, so I think we should not paralyse development by requiring to cover too much use-cases.