Now we can define map dimensions for 'geolocation_googlemaps_dynamic' in formatter view settings, but only in 'px'. Responsive design used width in '%'.
How can I alter or define such thing?

Comments

Bright Web Design’s picture

Priority: Normal » Major

I am also looking for this feature.
It would be so great if you could allow options like "auto" "%"

vlad.dancer’s picture

Category: task » feature

Better category

Mark_L6n’s picture

I see that the nice Google Map displayed when editing a node uses 100% x 400px so this should be possible.
Additionally, it would be very useful to be able to override the dimensions in an individual node. (Have a default size for the content type that could be overridden by each node.)
On the topics of defaults and overrides, zoom level would be useful too--not every map will want the same zoom level.

sibiru’s picture

request this too

Johnxystus’s picture

i just change the "px" to "%" in geolocation_googlemaps.module at line 210 and i have a responsive maps
im using Geolocation version 7.x.1.1 ...

from
$width = strtok($settings['map_dimensions'], 'x') . "px";
to
$width = strtok($settings['map_dimensions'], 'x') . "%";

later i change the default 300x300 to 100x300

i hope they can unset this setting so we define our own size using CSS only

chefnelone’s picture

I'm interested too in this feature.

veronicaseveryn’s picture

I will create a patch to modify the settings.

veronicaseveryn’s picture

I will create a patch to modify the settings.

veronicaseveryn’s picture

Status: Active » Needs review
StatusFileSize
new9.3 KB

I have modified the input for map dimensions. I separated it into 2 fields for height and width, where one can input dimensions in PX or % (even mix % and PX, what I needed in my case). I've tested it and it works. Check it out.

Maks’s picture

Many thanks, veronicaSeveryn! Path works just fine!

derjochenmeyer’s picture

Great patch, thanks!

Fixed some coding standards issues and use of t().

To get this into a stable release we need a way to update these settings for existing installations.

derjochenmeyer’s picture

Here is one with an update function. Please test... it's in the latest 7.x-1.x-dev

Btw, this also alters the settings for static maps where % settings dont make any sense. Any solutions?

jglynn’s picture

Issue summary: View changes

You can override the map dimensions in your css stylesheet by simply using !important

ie.
.geolocation-map{
max-width: 100% !important;
height:400px !important;

}

  • derjochenmeyer committed bdb0276 on 8.x-2.x
    Issue #1805422 by vlad.dancer, veronicaSeveryn: allow dynamic map...
christianadamski’s picture

Component: Google Maps geolocation » Geolocation Field / Backend
Status: Needs review » Closed (won't fix)

Closing all 7.x issues. It's time.