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

Removed all autopanning/zooming + Meta-data for layers API Call . #255

Merged
merged 4 commits into from
Sep 14, 2019

Conversation

sagarpreet-chadha
Copy link
Collaborator

@sagarpreet-chadha sagarpreet-chadha commented Sep 7, 2019

Fixes #110!
Fixes #208!

So only Wisconsin layer automatically zooms and pans the map on loading .
So removed that feature .
Also minor bumped the version .

AND meta-data file created where we can give the information of each layer and when to call API (bounding box , min/max zoom , etc.) .

if(zoom < extents.minZoom){
return;
}
var bounds = new L.LatLngBounds(
Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This basically allows the API call only when we are in USA .

@sagarpreet-chadha sagarpreet-chadha changed the title Remove autopanning/zooming from Wisconsin layer . Removed all autopanning/zooming + Meta-data for layers API Call . Sep 8, 2019
@sagarpreet-chadha
Copy link
Collaborator Author

@jywarren ...how does this looks?

Copy link
Member

@jywarren jywarren left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is great. Couple clarifying questions. Also I'm starting to organize a new README in https://pad.publiclab.org/p/lel FYI!

@@ -64,7 +64,7 @@
).addTo(map);

L.LayerGroup.EnvironmentalLayers({
include: ['mapknitter', 'clouds'],
//include: ['mapknitter', 'clouds'],
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Oops was this intentional?

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nope reverting this!

src/info.json Outdated
"url": "https://services.arcgis.com",
"api_url": "https://services.arcgis.com/jDGuO8tYggdCCnUJ/arcgis/rest/services/Nonmetallic_and_Potential_frac_sand_mine_proposals_in_West_Central_Wisconsin/FeatureServer/0/",
"extents": {
"NE_lat": 44.08758502824518,
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is looking awesome. Great work. Are there maybe standard parameter formats from the Leaflet API for bounds?

https://leafletjs.com/reference-1.4.0.html#bounds

This seems to show:

[
    [40.712, -74.227],
    [40.774, -74.125]
]

...noting that each pair can also be a LatLng object.

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Okay 👍

if (self.layer == "fractracker"){
Layer_URL = "https://spreadsheets.google.com/feeds/list/19j4AQmjWuELuzn1GIn0TFRcK42HjdHF_fsIa8jtM1yw/o4rmdye/public/values?alt=json" ;
if (self.layer === "fractracker"){
Layer_URL = info.fractracker.api_url; ;
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Love this!!!!

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks <3

Copy link
Collaborator Author

@sagarpreet-chadha sagarpreet-chadha left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I have done the changes! I am going ahead and merging this and releasing on npm as well 👍 .

@sagarpreet-chadha sagarpreet-chadha merged commit fe7aa70 into master Sep 14, 2019
@sagarpreet-chadha sagarpreet-chadha deleted the feature_remove_autoZooming branch September 14, 2019 08:04
@jywarren
Copy link
Member

jywarren commented Sep 14, 2019 via email

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Lagging of map in full screen due to large parsing of data Bounding box ordering, re-centering issues?
2 participants