Viewing 5 replies - 1 through 5 (of 5 total)
  • Not the best solution, but if you go into

    pronamic-google-maps -> classes
    and open
    Pronamic_Google_Maps.php

    go to line 270 and

    replace
    $content .= sprintf(‘<div class=”canvas” style=”width: %dpx; height: %dpx;”>’, $info->width, $info->height);

    with
    $content .= sprintf(‘<div class=”canvas”>’, $info->width, $info->height);

    Then you can control the size of the map in css either in percentage or pixels.

    David.

    Thread Starter Ben B

    (@ben-b)

    Thanks for the pointer, David. While I couldn’t get your code to work directly; I was able to amend the code to append ‘px’ to height and ‘%’ to width which gave me the result I was after.

    Thanks!

    Ben

    Plugin Author Remco Tolsma

    (@remcotolsma)

    Unfortunately it is not possible to use another dimension type. Adjusting the core files of the plugin isn’t a very nice solution. These changes are likely to be lost during an update.

    Ben, any chance you can post the code that you used to get this working? It looks like this comment form hid the solution daybot posted.

    Thanks!

    I was able to get it working by adjusting line 270 (from daybot’s post) to this:

    $content .= sprintf('<div class="canvas" style="width: %dpx; height: %dpx;">', '100%', $info->height);

Viewing 5 replies - 1 through 5 (of 5 total)
  • The topic ‘[Plugin: Pronamic Google Maps] Map widths in Percentages/Ems/Auto etc.’ is closed to new replies.