Problem/Motivation

Street View support for the Geolocation Google Map widget and formatter allows a user to save Street View POV data in a Geolocation field. This way, a user can let a map immediately show a specific Street View POV to the visitor.

Proposed resolution

The POV is configured on the widget simply by dropping the Street View marker onto a road and configuring the heading, pitch and zoom with the mouse, as one would expect. The applicable heading, pitch and zoom values are saved in the field's data column. The widget behaves as-is when Street View is left unopened.

The formatter is able to load the POV values and lets the map open Street View immediately. This only works on the map itself, not on a list of common map locations. Thus, "Set marker" needs to be disabled.

In addition, the widget/formatter can now be configured to enable or disable addressControl and enableCloseButton options on the StreetViewPanorama, so the visitor can eventually not return to the regular map display on the embed.

Remaining tasks

  • More Street View options to be made configurable in GoogleMapsDisplayTrait
  • The ability to set a POV as the default field/widget value
  • Tests?

User interface changes

Two new options in the widget/formatter (addressControl and enableCloseButton).

API changes

Data model changes

addressControl and enableCloseButton added to geolocation.google_map_settings.

Comments

dietr_ch created an issue. See original summary.

dietr_ch’s picture

Status: Active » Needs review
StatusFileSize
new15.67 KB

Status: Needs review » Needs work

The last submitted patch, 2: street-view-support-2851223-2.patch, failed testing.

dietr_ch’s picture

Status: Needs work » Needs review
StatusFileSize
new15.64 KB

Re-rolled patch.

Status: Needs review » Needs work

The last submitted patch, 4: street-view-support-2851223-4.patch, failed testing.

dietr_ch’s picture

Status: Needs work » Needs review
StatusFileSize
new15.64 KB

Changing isset() to !empty() on function call result.

christianadamski’s picture

Status: Needs review » Postponed (maintainer needs more info)

Hey dietr_ch,

this is a well worked out issue and patch is fine too as far as I can tell. But this way too much of an edge case for me. After all this does result in a lot more to keep in mind with future changes. I won't commit this.

If you do think that this is useful to others, and maybe some other people step up and add support, we can work together to work this into a sub-module, which adds new widget/formatter inheriting from the existing ones.

Sorry to say this as you put a lot of good work into this.

Leaving this issue open for a while to see if more people add opinions.

dietr_ch’s picture

I see. It's indeed an edge case (for a client of ours). I can make it a submodule but not sure when I'll have the time. We need the functionality anyway, and it beats re-rolling the patch every time. :)

Dietrich

christianadamski’s picture

Status: Postponed (maintainer needs more info) » Closed (won't fix)

It might be a good idea to use the "data" attribute of geolocation field to (serialized) store your additional data.

dietr_ch’s picture

Update: I wrote a separate Geolocation Street View module.

Dietrich

christianadamski’s picture

Added a link to geolocation module page

doxigo’s picture

Component: Google Maps geolocation » Geolocation Field / Backend

With the recent changes in the latest 3.x version the Geolocation Street View module is now broken completely, the street view module is abandoned as of now and I'm wondering if we can get this into geolocation itself as a submodule maybe?