anvc / scalar

Born-digital, open source, media-rich scholarly publishing that’s as easy as blogging.
Other
231 stars 73 forks source link

map widget default zoom setting #87

Open rcrath opened 6 years ago

rcrath commented 6 years ago

Hi, I am wondering if it is possible to set the default zoom level on the map widget. google maps api says this is possible. they do it via the there thusly:

https://maps.googleapis.com/maps/api/staticmap?center=40.714728,-73.998672&zoom=12&size=400x400&key=YOUR_API

and there is an add "&z=nn" to the end of the url where nn:1-21, but there is no href in the map widget anchor, and thus no url.

I tried adding "MapWidgetZoom = 18;" in the styling, as per this site, but that did not seem to work. probably not defined in css. There is a javascript way on another platform, but it seems specific to the platform, so I did not mess with it in js tab of styling.

If this is not implemented, consider it a feature request plz! I would propose another setting on the widget page, a srop down menu with the numbers 1-21 and a few of the numbers having guidepost descriptions as per the Google page:

1: World 2 3 4 5: Landmass/continent 6 7 8 9 10: City 11 12 13 14 15: Streets 16 17 18 19 20: Buildings 21

Thanks!

craigdietrich commented 6 years ago

Yep, it can be set with the Google Maps API, but we don't expose this as a setting in Scalar. Seems like we should for sure! I'll talk to our internal team.