Page MenuHomePhabricator

Page Forms: add "starting bounds" parameter for "googlemaps" input type
Closed, ResolvedPublic

Description

In the "googlemaps" input type for the Page Forms extension, when the user goes to set the coordinates for a new page, they see a map of the whole world. It would be good if the people creating the form could set the bounds for that map - to focus on just a single city, for instance, if they know that all points will be inside that city.

What is needed is a new parameter, called "starting bounds=", that takes in latitude and longitude to define the northwest and southeast points for the starting map. The value should have a format like "lat1, lon1; lat2, lon2". So a full input tag might look like:

{{{input|The coordinates|input type=googlemaps|starting bounds=41.63,-88;41,65,-87.5}}}

Note that this should only take effect if there is no value set for this field; if there is already a value set, this parameter should be ignored.

Event Timeline

Done! Thanks to a patch by @Nikhil-nk .