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

Using Mapknitter API #10

Closed
sagarpreet-chadha opened this issue Jun 8, 2018 · 4 comments
Closed

Using Mapknitter API #10

sagarpreet-chadha opened this issue Jun 8, 2018 · 4 comments
Labels
help wanted Extra attention is needed

Comments

@sagarpreet-chadha
Copy link
Collaborator

sagarpreet-chadha commented Jun 8, 2018

Hi @jywarren !

The construction of API for fetching data is solved here : publiclab/mapknitter#251

The corresponding API example is : https://mapknitter.org/map/region/Gulf-Coast.json?minlon=-98.8&minlat=23.6&maxlon=-79.1&maxlat=31.8

We can get the map centers from leaflet library using :
var center = _map.getCenter() ;
and Latitude is then center.lat and longitude is center.lng .

Using this how should we set the minlon , minlat , maxlon , maxlat parameters in the API url ?

Thanks :octocat: !

@sagarpreet-chadha sagarpreet-chadha added the help wanted Extra attention is needed label Jun 8, 2018
@jywarren
Copy link
Member

jywarren commented Jun 8, 2018 via email

@sagarpreet-chadha
Copy link
Collaborator Author

So we need NorthEast coordinates and SouthWest coordinated of the Bounding box , right ?
See here : https://leafletjs.com/reference-1.3.0.html#latlngbounds-getnortheast

So ,
NorthEast coordinate = maxlat and maxlon
SouthWest coordinate = minlat and minlon
is this correct @jywarren ?

@jywarren
Copy link
Member

jywarren commented Jun 8, 2018 via email

@sagarpreet-chadha
Copy link
Collaborator Author

PR #13 .

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
help wanted Extra attention is needed
Projects
None yet
Development

No branches or pull requests

2 participants