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

T158575 get wikidata for Q123 requests via proxy #10

Open
Eccenux opened this issue Oct 26, 2022 · 3 comments
Open

T158575 get wikidata for Q123 requests via proxy #10

Eccenux opened this issue Oct 26, 2022 · 3 comments

Comments

@Eccenux
Copy link
Member

Eccenux commented Oct 26, 2022

Support getting object data from Wikidata via Wikimedia maps proxy.

On Wikimedia Phabricator:
T158575 WIWOSM wikidata not being updated for Q123 requests

@Eccenux Eccenux changed the title T158575 WIWOSM wikidata not being updated for Q123 requests T158575 get wikidata for Q123 requests via proxy Oct 26, 2022
Eccenux added a commit that referenced this issue Oct 26, 2022
@Eccenux
Copy link
Member Author

Eccenux commented Oct 26, 2022

@Eccenux
Copy link
Member Author

Eccenux commented Oct 26, 2022

Alaska is a bit weird, but seems at least partially intentional:
https://wiwosm.toolforge.org/test-osm-on-ol/kml-on-ol.php?lang=wikidata&title=Q797&zoom=4&lat=61.7939&lon=-161.10352&layers=B000TTT

// big shapes zoom to extent which seem overly big for alaska
if (vector_layer.getDataExtent().getHeight() > 500) {
	map.zoomToExtent(vector_layer.getDataExtent(), false);
}
// this is skipped as h = 4986362.2804698
if (!args.lon && vector_layer.getDataExtent().getHeight() <= 500) {
	map.setCenter(vector_layer.getDataExtent().getCenterLonLat(), 17);
}

The weird part might come from the fact that Alaska is on the border of the map (part of it is on negative lon and part of it is on positive lon). Seems like OpenLayers bug. They've probably fixed this in later versions.

Not very important in any case.

@Eccenux
Copy link
Member Author

Eccenux commented Oct 26, 2022

Might mitigate this partially by ignoring zoomToExtent when args.lon and zoom is set. This way permanent links will also work better (you will be able to link to zoomed-in shapes - not possible currently).

BTW. I might want to get args.lat/lon directly from URL... Seems like too much is done in PHP.

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

No branches or pull requests

1 participant