Plugin Directory

Changeset 1085503


Ignore:
Timestamp:
02/09/2015 01:04:02 PM (11 years ago)
Author:
Fengler
Message:

New option added- enable disable infowindow

Location:
magic-google-maps/trunk
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • magic-google-maps/trunk/js/bf_script.js

    r1077709 r1085503  
    2020      content: contentString
    2121  });
    22 
     22  var enableInfowindow = scriptParams.enable_descryption;
     23 
     24 
    2325  var marker = new google.maps.Marker({
    2426     
     
    2931    map: map
    3032  });
    31  
     33  if (enableInfowindow =="1" ){
    3234  infowindow.open(map,marker);
    33 
    34    google.maps.event.addListener(marker, 'click', function()  {
     35  }
     36   /*
     37google.maps.event.addListener(marker, 'click', function()  {
    3538    infowindow.open(map,marker);
    3639  });
     40*/
    3741}(window, google));
  • magic-google-maps/trunk/magic-Maps.php

    r1080815 r1085503  
    44 * Plugin URI: http://www.magicpluginfactory.com/
    55 * Description: Add Google maps quickly and easly to your page. Light weight plugin optymized for speed.
    6  * Version: 1.0.1
     6 * Version: 1.0.2
    77 * Author: Magic Plugin Factory
    88 * Author URI: http://www.magicpluginfactory.com/
     
    9898                        );
    9999     add_settings_field(
     100                        "enabledescryption",
     101                        "Enable Descryption",       
     102                        "enable_descryption",       
     103                        "magicmaps" ,               
     104                        "googleMapsSection"         
     105                        );
     106     add_settings_field(
    100107                        "placedescryption",
    101108                        "Descryption",     
     
    147154                        "googleMapsSection"         
    148155                        );
     156     
    149157     register_setting(
    150158                        "googleMapsSection",            //(string) (required) A settings group name. Must exist prior to the register_setting call. This must match the group name in settings_fields()
     
    174182                        "googleMapsSection",           
    175183                        "PlaceDescryption"             
     184     );
     185     register_setting(
     186                        "googleMapsSection",           
     187                        "EnableDescryption"             
    176188     );
    177189     register_setting(
     
    238250    echo '<textarea rows="6" cols="30" name="PlaceDescryption" id="PlaceDescryption" value="" >'.  $option_descryption .'</textarea>';
    239251}
     252function enable_descryption(){
     253            $enable_descryption = get_option('enabledescryption');         
     254            $html = '<input type="checkbox" id="EnableDescryption" name="EnableDescryption" value="1"'.checked( 1, $enable_descryption['EnableDescryption'], false ) .' />';
     255            $html .= '<label for="checkbox_example">Display or hide Info window</label>';
     256            echo $html;
     257}
    240258function height(){
    241259            $option_height = get_option('height','200px');         
     
    286304        'option_Pin_lng' => get_option('googlemapspinLng'),
    287305        'option_descryption' => get_option('placedescryption'),
    288         'option_zoom' => get_option('zoom')
     306        'option_zoom' => get_option('zoom'),
     307        'enable_descryption' => get_option('enabledescryption')
    289308    );
    290309   
     
    303322        'option_Pin_lng' => get_option('googlemapspinLng'),
    304323        'option_descryption' => get_option('placedescryption'),
    305         'option_zoom' => get_option('zoom')
     324        'option_zoom' => get_option('zoom'),
     325        'enable_descryption' => get_option('enabledescryption')
    306326    );
    307327
  • magic-google-maps/trunk/readme.txt

    r1083076 r1085503  
    6363= 3. Do I need Google Maps API key? =
    6464
    65 The Google Maps does not require an API key to function correctly. However read more information [Google Maps API] (https://developers.google.com/maps/signup)
     65The Google Maps does not require an API key to function correctly. However if you would like to find more about Google maps API read this [Google Maps API] (https://developers.google.com/maps/signup)
    6666
    6767== Screenshots ==
     
    7171
    7272== Changelog ==
     73
     74= 1.0.2 =
     75* New option added to disable or enable infowindow Google maps
    7376
    7477= 1.0.1 =
Note: See TracChangeset for help on using the changeset viewer.