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
Adding features to leaflet blurred location display (needs breaking up into separate issues) #9
Comments
Yes, let's do! Are there some we can copy over from the big planning issue
in leaflet-blurred-location?
I have one: add the ability to re-center the map via a geocoding search
field. It could be almost identical to the input system, but just recenter
the map of displayed locations. Make sense?
Also 2b on this has a lot: publiclab/plots2#1416
…On Sat, Mar 3, 2018 at 12:10 AM, Mridul Nagpal ***@***.***> wrote:
@jywarren <https://github.com/jywarren> Shall we extend this as well. Can
you create some issues, I would love to work on this!!
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
<#9>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/AABfJwj_0s7NWrc4Rz1NFudQjAhuu2Ktks5taiXHgaJpZM4SayPc>
.
|
@jywarren Can you give an example? |
Sure! Basically imagine using this library over at http://publiclab.org/people -- and imagine you want to enter Make sense? Thanks!!! |
Isn't something like this already being done in leaflet blurred location? |
@jywarren Can you give a code example? |
^ yes, it is very similar, except that we are doing this where we are displaying a list of locations, rather than inputting a location. @sagarpreet-chadha is working on a similar feature and perhaps this could be approached collaboratively: publiclab/plots2#2585 We want this feature both for display of blurred locations, and for general maps on PublicLab.org, so can you two discuss where you think it best to implement it so it appears in both? If it's pretty simple code we can just include it in multiple places, but let's think through the advantages of where we could implement this cleanly. Thanks!! |
Hi @mridulnagpal ! I think we have various maps (including inline maps) on our website , so i think lets create a new library or may be use this library to create a library such that we can display all maps using this library only AND each map having its own unique feature like :
Basically making all different features in a library and giving the developer/end-user the options to use any combination of these features . Makes sense ? What do you think ? |
@jywarren Let's continue with this, shall we? |
@jywarren Any views? |
Sorry Mridul! Been traveling (again!). Looking over this now. |
So, the basic function is:
I like what @sagarpreet-chadha is suggesting -- i think the ability to search the map is key. |
So does this make sense? That in this library, as you zoom in, some locations appear only within some zoom levels, that are close to the precision they were entered in? If they have lots of precision, they might appear in many zoom levels, but if they are very imprecise (highly blurred), they would be hidden once you zoom in too far. We could write a test to check for this -- so it would start the map up, go to a certain zoom level, and check what's visible, then zoom in further and check again, for 3 or 4 zoom levels. Then we could write the functions of this library to ensure that the markers are properly displayed for those given zoom levels. @sagarpreet-chadha and @stefannibrasil and @milaaraujo are working on API queries that may also be used to populate this map on the Public Lab website. @sagarpreet-chadha can help explain how it was done to 'refresh on drag' with a new query to the API on features like this: https://publiclab.org/wiki/inline-maps (although those don't seem to be refreshing?) Another task might be to add a "loading" indicator -- a spinner -- while map refreshes are occurring, so you know it's still loading. |
Hi @jywarren ...dynamic fetching of new data on zooming or panning is still not solved in this issue publiclab/plots2#1934 (and not done by me 😄) . Lets confirm if @stefannibrasil and @milaaraujo are working on it ❓ Thanks ! |
I have done that in leaflet-environmental-layers as of now 😄 . |
@sagarpreet-chadha @jywarren How do we fetch all the location objects from the database? |
ah, sorry, that issue seems so long ago! Thanks!
…On Fri, Jun 29, 2018 at 12:54 PM Mridul Nagpal ***@***.***> wrote:
@sagarpreet-chadha <https://github.com/sagarpreet-chadha> @jywarren
<https://github.com/jywarren> How do we fetch all the location objects
from the database?
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
<#9 (comment)>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/AABfJ6QvYz1UFjpopRL_NqVqdUgbiXypks5uBlucgaJpZM4SayPc>
.
|
Hi, everyone, for now, we are not working on that, but we definitely can in the next weeks! What I am almost finishing is this #2790 |
Thats great @stefannibrasil ! @mridulnagpal ...we use API 😄 . Hope that helps ! |
For starters i think you can use a set of example data that's in the same format, so look at functions here: https://publiclab.org/api/docs/ and https://github.com/publiclab/plots2/blob/master/doc/API.md and maybe use https://publiclab.org/api/srch/taglocations?srchString=41,-89 You can have this be an example file you save statically in the library, in fact, in the example. |
But we might also think about the API providing a standard GeoJSON output? |
@jywarren Working on a prototype, will push a demo soon!! |
Hey @jywarren I tried Failed to load https://publiclab.org/api/srch/taglocations?srchString=41,-89: No 'Access-Control-Allow-Origin' header is present on the requested resource. Origin 'null' is therefore not allowed access. |
Ah, I think we need a cors permission on publiclab.org - @icarito would you
be able to help? Thanks!
…On Thu, Jul 12, 2018, 11:04 AM Mridul Nagpal ***@***.***> wrote:
Hey @jywarren <https://github.com/jywarren> I tried
$.getJSON("https://publiclab.org/api/srch/taglocations?srchString=41,-89",
function(data) { console.log(data); });
And am getting the error:
Failed to load
https://publiclab.org/api/srch/taglocations?srchString=41,-89: No
'Access-Control-Allow-Origin' header is present on the requested resource.
Origin 'null' is therefore not allowed access.
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
<#9 (comment)>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/AABfJyJqLBdUaQIAzUNmcdmmzi8ewLVkks5uF2VggaJpZM4SayPc>
.
|
Sure, will do!
…On 12/07/18 11:13, Jeffrey Warren wrote:
Ah, I think we need a cors permission on publiclab.org - @icarito
would you
be able to help? Thanks!
On Thu, Jul 12, 2018, 11:04 AM Mridul Nagpal ***@***.***>
wrote:
> Hey @jywarren <https://github.com/jywarren> I tried
>
$.getJSON("https://publiclab.org/api/srch/taglocations?srchString=41,-89",
> function(data) { console.log(data); });
> And am getting the error:
>
> Failed to load
> https://publiclab.org/api/srch/taglocations?srchString=41,-89: No
> 'Access-Control-Allow-Origin' header is present on the requested
resource.
> Origin 'null' is therefore not allowed access.
>
> —
> You are receiving this because you were mentioned.
> Reply to this email directly, view it on GitHub
>
<#9 (comment)>,
> or mute the thread
>
<https://github.com/notifications/unsubscribe-auth/AABfJyJqLBdUaQIAzUNmcdmmzi8ewLVkks5uF2VggaJpZM4SayPc>
> .
>
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
<#9 (comment)>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/AAMMS3liqR7Ra2gA0qJFyudHj-cvHrENks5uF3XGgaJpZM4SayPc>.
|
Hi! |
@icarito Yeah thanks man it works!! |
@jywarren Here is the prototype |
hey, everyone, @milaaraujo and I would be happy to help with anything. Do you still need some method from the API that we can help with? Cheers! |
@stefannibrasil The CORS error was resolved and now I can use the API, thanks :) |
Ooh, this is really nice @mridulnagpal -- do you have a PR open for this? Do you think you could configure your fork's Great work! |
@jywarren Done, you can test it here!! |
@jywarren I am directly installing from npm, should we update the version there? |
OK i'm publishing a new version on npm! But, where do I look for the markers? Should I be seeing them when I start it up? |
published! |
Can we put a list of sample locations in the |
And with demo locations in the example file, we can move forward on #10, too, right? Thanks, Mridul!!! |
@jywarren Do you mean move to a location by default where there are already tags? |
No, i meant actually that we hard code in some locations, so, you could inline in the |
Got it, working on it!! |
@jywarren What's next? |
@jywarren Should we move to something new as well? |
Yes, as soon as you're getting #13 working, i think you should think about how each grid square could be shaded darker based on how many blurred locations are within it -- want to think a little bit about how that could work? Would a function go through the visible grid squares and count, then establish a scale from "none" to "many" and shade accordingly, each time |
@jywarren Shall we extend this as well. Can you create some issues, I would love to work on this!!
The text was updated successfully, but these errors were encountered: