Hi,
Thanks for the responses.
Pe sâmbătă, 9 mai 2020, Marius Hoch <hoo(a)online.de> a scris:
Hi Strainu,
as Michael already pointed out, the (currently hard-coded) zoom value can
be found in CachingKartographerEmbeddingHandler::getWikiText.
I guess we could try to derive the zoom from the precision of the
coordinate (GlobeCoordinateValue::getPrecision), but other than that, I
don't have a (nice and easy to implement) idea for improving this.
Other things that I have seen done in modules throughout the ecosystem are
using the bbox limits (P1333&co) and the surface. I am also considering
using the geo data from Commons, although that's in pretty bad shape (pun
intended). The precision is indeed another solution, although I would leave
it as the last option, since it depends more often on the data source than
on the subject itself. I hope some of those can be reused in php as well.
Any suggestions on how to prioritize those and/or other data sources in Lua
are welcome. I asked about the php code as I thought you might have some
"instance of"-based algorithm I could replicate.
Straini
Cheers
Marius
On 5/9/20 12:42 AM, Michael Holloway wrote:
Hi Strainu,
It's probably best if a Wikibase dev confirms, but I think this is what
you're looking for:
https://gerrit.wikimedia.org/r/plugins/gitiles/mediawiki/ext
ensions/Wikibase/+/master/lib/includes/Formatters/CachingKar
tographerEmbeddingHandler.php#198
-mdh
On Fri, May 8, 2020 at 12:44 PM Strainu <strainu10(a)gmail.com> wrote:
Hey folks,
Can someone point me to the code that decides which zoom to use for
the maps that are displayed in the items with coordinates?
Thanks,
Strainu
_______________________________________________
Wikitech-l mailing list
Wikitech-l(a)lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/wikitech-l
_______________________________________________
Wikitech-l mailing list
Wikitech-l(a)lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/wikitech-l
_______________________________________________
Wikitech-l mailing list
Wikitech-l(a)lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/wikitech-l