WeAreFairphone / fprsmap

This is a Leaflet map of the local Fairphoners communities
https://map.fairphone.community
GNU General Public License v3.0
10 stars 7 forks source link

Multiple layers #5

Closed StefanBrand closed 7 years ago

StefanBrand commented 8 years ago

Have more than one layer, e.g.:

Roboe commented 8 years ago

Great idea! While I implement #8, can you look for a Leaftlet's function to clear markers? We'll probably need it.

StefanBrand commented 8 years ago

There actually is an ILayer object in Leaflet. I didn't dive into it, but I think we could just use addLayer and removeLayer, where each layer contains a set of locations. (E.g. the set of locations we use now would go to one layer, which could be added and removed arbitrarily.)

StefanBrand commented 8 years ago

Check out the rather dirty implementation in the new layers branch. I did it following this tutorial. The result needs some clean up, but the setup is straightforward.

Roboe commented 8 years ago

Woa, that was rather straightforward, indeed. Good job. I'm finishing #8 right now, we can take this issue after that

Roboe commented 7 years ago

We can make a polyline for the community FP2, :)

StefanBrand commented 7 years ago

We can make a polyline for the community FP2, :)

That would have to be maintained manually, wouldn't it?

Roboe commented 7 years ago

If Fairphone provides us with an endpoint with a history of locations… it wouldn't. I guess they have some kind of tracking over the FP2 location?

First implementation (until we get the FP official backend) would be manual, yes, but we have done that before with communities, didn't we? We have the FP2 journal thread in the forum, we just need to pick the cities and make a YAML/JSON

StefanBrand commented 7 years ago

I guess they have some kind of tracking over the FP2 location?

I don't think so. They have the scratch map: https://forum.fairphone.com/t/current-location-of-the-community-fairphone-2/21519/3?u=stefan :wink: