Plugin Directory

Changeset 1907150


Ignore:
Timestamp:
07/10/2018 02:23:07 PM (8 years ago)
Author:
matt.burnett
Message:
  • Add infowindow open on load or click option
Location:
yumjam-simple-map-shortcode/trunk
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • yumjam-simple-map-shortcode/trunk/options.php

    r1906849 r1907150  
    1717   
    1818    <hr>
     19    <h2>Shortcode Example</h2>
    1920   
    20     <h2>Shortcode options</h2>
     21    [yj_map address="Buckingham Palace, Westminster, London SW1A 1AA" infowindow="&lt;strong>Buckingham Palace&lt;/strong>&lt;br> Westminster&lt;br> London&lt;br> SW1A 1AA" infoopen="load"]
     22   
     23    <br><br>
     24    <hr>
     25   
     26    <h2>Shortcode Options</h2>
    2127   
    2228    <table cellpadding='10px' border=1>
     
    6874                <td>15</td>
    6975                <td>
    70 The following list shows the approximate level of detail you can expect to see at each zoom level:<br>
    71 <br>
    72 1: World<br>
    73 5: Landmass/continent<br>
    74 10: City<br>
    75 15: Streets<br>
    76 20: Buildings <br>
     76                    The following list shows the approximate level of detail you can expect to see at each zoom level:<br>
     77                    <br>
     78                    1: World<br>
     79                    5: Landmass/continent<br>
     80                    10: City<br>
     81                    15: Streets<br>
     82                    20: Buildings <br>
    7783                </td>
    7884            </tr>   
     
    8793                <td>parameter content populates infowindow, blank or ommited is disabled</td>
    8894            </tr> 
     95            <tr>
     96                <td>infoopen</td>
     97                <td>click</td>
     98                <td>Open the infowindow on page load or on marker click <br>
     99                    <br>
     100                    click<br>
     101                    load<br>
     102                </td>
     103            </tr>             
    89104        </tbody>
    90105    </table>
  • yumjam-simple-map-shortcode/trunk/readme.txt

    r1906849 r1907150  
    4545== Changelog ==
    4646
     47= 1.0.1 =
     48* Add map type selection from within shortcode
     49* Add infowindow open on load or click option
     50
    4751= 1.0.0 =
    4852* First Release.
  • yumjam-simple-map-shortcode/trunk/yumjam-simple-map-shortcode.php

    r1907143 r1907150  
    8383                    'maptype' => 'roadmap', // roadmap, satellite, hybrid, terrain
    8484                    'infowindow' => '',
     85                    'infoopen' => 'click'
    8586                ), $atts
    8687            );
     
    134135<?php
    135136                        if (!empty($atts['infowindow'])) {
    136                             ?>                       
    137                             marker.addListener('click', function() {
     137                            if (!empty($atts['infoopen']) && $atts['infoopen'] == 'load') {
     138                                ?>
    138139                                infowindow.open(map_<?php echo $map_id; ?>, marker);
    139                             });
    140                             <?php
     140                                <?php                               
     141                            } else {
     142                                ?>
     143                                marker.addListener('click', function() {
     144                                    infowindow.open(map_<?php echo $map_id; ?>, marker);
     145                                });
     146                                <?php
     147                            }
    141148                        }
    142149?>
Note: See TracChangeset for help on using the changeset viewer.