-
Notifications
You must be signed in to change notification settings - Fork 12
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
Precision examples #13
Conversation
|
||
console.log(options.blurredLocation.getPrecision()); | ||
var markers = { | ||
marker_1: [1.5, 10.7, 0], |
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.
Ah, actually these could stay in the example index.html code -- we just need to display them only at a range of zoom levels corresponding to their precision. So if they're x.x
precision, we can use this guide to decide what zoom levels they should be shown for!
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.
For example, if we're zoomed in so that the grid squares represent x.xx
precision, we would NOT show markers with only x.x
precision. But we WOULD show markers with x.xx
precision or better. Make sense?
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.
We will have to bind them to the setZoom function right? Also where do you think we should store the markers, as once we need their objects to remove them. And we will have to remove them once the user zooms in to a greater precision.
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.
@jywarren Any comments?
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, @mridulnagpal -- yes, we should create a listener on setZoom
, and I think we should hide them, but not delete them. Does that make sense?
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.
@jywarren Yes, got it!!
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.
@jywarren Just checked the hide option for layers is under construction, for now we can keep an array of location and when setZoom is called we remove all the markers and add the markers with correct precision, sounds good?
well, these are related enough that perhaps we should try to solve it all
in one PR? Or are you saying we could remove all markers each time (instead
of hiding) and then scan through and add only the ones with correct
precision? I think either could work. If you think maintaining a separate
list is better than hiding, I'm OK with it -- what are the pros and cons?
…On Thu, Aug 16, 2018 at 2:20 PM Mridul Nagpal ***@***.***> wrote:
***@***.**** commented on this pull request.
------------------------------
In src/blurredLocationDisplay.js
<#13 (comment)>
:
> @@ -39,10 +39,35 @@ BlurredLocationDisplay = function BlurredLocationDisplay(options) {
return blurredLocations;
}
+ function exampleMarkers() {
+
+ function marker_display() {
+
+ console.log(options.blurredLocation.getPrecision());
+ var markers = {
+ marker_1: [1.5, 10.7, 0],
@jywarren <https://github.com/jywarren> Just checked the hide option for
layers is under construction, for now we can keep an array of location and
when setZoom is called we remove all the markers and add the markers with
correct precision, sounds good?
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
<#13 (comment)>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/AABfJ-IWM73rJIoQZlTkwAWy0_ThoNGKks5uRVVEgaJpZM4V0a2f>
.
|
If we start fresh whenever the precision changes, there is no scope of leak of information, also there would be one list having all the locations which will be unchanged. We will just be displaying items which are of correct precision. It would be slower as compared to removing the some markers but safer. |
But we have already scrubbed any information out of them, since we are not
storing any extra precision, right? So I think perhaps hiding (if most
efficient) would be best.
…On Thu, Aug 16, 2018 at 2:41 PM Mridul Nagpal ***@***.***> wrote:
If we start fresh whenever the precision changes, there is no scope of
leak of information, also there would be one list having all the locations
which will be unchanged. We will just be displaying items which are of
correct precision. It would be slower as compared to removing the some
markers but safer.
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
<#13 (comment)>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/AABfJ-IJuEJhQlvOuaTQHsvqy1--qKrZks5uRVpUgaJpZM4V0a2f>
.
|
Cool, will do some more research to check if hiding layers is available in leaflet. |
awesome!
…On Thu, Aug 16, 2018 at 2:54 PM Mridul Nagpal ***@***.***> wrote:
Cool, will do some more research to check if hiding layers is available in
leaflet.
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
<#13 (comment)>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/AABfJw9GA13gPC9QmR5VUI3WZ0YV-fzSks5uRV1rgaJpZM4V0a2f>
.
|
Hi @jywarren I looked at the documentation, it seems there is a hide function but it only hides one base layer in the control. We need to hide multiple layers on the map. What do you suggest, should we try with removeLayer? |
We're going to solve this with the |
#10 Moved code to blurredLocationDisplay src instead of index.html. Now we need a mechanism to show just those markers with specific precisions