Skip to content
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

Show markers on the map for each existing places #3

Open
tboychuk opened this issue Oct 5, 2018 · 4 comments
Open

Show markers on the map for each existing places #3

tboychuk opened this issue Oct 5, 2018 · 4 comments
Assignees
Labels
2 - Working <= 5 feature request A request to implement a new feature

Comments

@tboychuk
Copy link
Collaborator

tboychuk commented Oct 5, 2018

  • create map new layer that will contains all markers.
  • load places from the database using new endpoint created in #13.
  • create marker for each place and show it on the map.
  • configure app to load and show new markers when map position is changed
@tboychuk tboychuk added 0 - Backlog feature request A request to implement a new feature blocked labels Oct 5, 2018
@tboychuk
Copy link
Collaborator Author

tboychuk commented Oct 5, 2018

Blocked by back-end, ticket #13

@tboychuk
Copy link
Collaborator Author

You can use some JavaScript mocks to show real places on the map:

const placeList = [{
            "name": "Сивуля Мала",
            "altitude": 1815,
            "location": {"type": "Point", "coordinates": [24.129341868695505, 48.54517608528801]}
        },
            {
                "name": "Сивуля Велика",
                "altitude": 1836,
                "location": {"type": "Point", "coordinates": [24.11940784912607, 48.54923298198662]}
            },
            {
                "name": "Боревка",
                "altitude": 1695,
                "location": {"type": "Point", "coordinates": [24.103815880571133, 48.56281089278543]}
            },
            {
                "name": "Лопушна",
                "altitude": 1722,
                "location": {"type": "Point", "coordinates": [24.11420893925076, 48.55423748094368]}
            }];

@tboychuk
Copy link
Collaborator Author

Having place JSON, you can create a Marker:

var latlng = L.latLng(place.location.coordinates);
var marker = L.marker([latlng.lng, latlng.lat]);

@tboychuk
Copy link
Collaborator Author

We're gonna use a react-map-gl library built by engineers from Uber.

tboychuk added a commit that referenced this issue Dec 19, 2018
- Add dependency to React Map GL library (built by Uber)
- Configure a map with some markers on it, the markers are loaded from the server

Issues #3
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
2 - Working <= 5 feature request A request to implement a new feature
Projects
None yet
Development

No branches or pull requests

2 participants