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.

Details

Related Gerrit Patches:

Event Timeline

Restricted Application added a subscriber: Aklapper. · View Herald TranscriptFeb 12 2018, 7:33 PM
BamLifa claimed this task.Feb 15 2018, 3:07 PM

@BamLifa: Are you working on this?

Nikhil-nk added a subscriber: BamLifa.
Yaron_Koren closed this task as Resolved.Mar 12 2018, 8:07 PM

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