Plugin Directory

Changeset 1857938


Ignore:
Timestamp:
04/13/2018 02:57:45 PM (8 years ago)
Author:
bnisia
Message:

enough fixes

Location:
ia-map-analytics-basic/trunk
Files:
1 added
2 edited

Legend:

Unmodified
Added
Removed
  • ia-map-analytics-basic/trunk/ia-mapanalytics.php

    r1782840 r1857938  
    44Plugin URI: http://www.4w.com/mapanalytics
    55Description: Easily create a map via a short code using uploaded KML or GeoJSON
    6 Version: 20171206
     6Version: 20170413
    77Author: Information Analytics
    88Author URI: http://4w.com/
     
    219219       
    220220        $key = get_option('google_api_key');
    221        
    222         echo "<img $idstr $mystyle src='' />";
    223         echo "<script> document.addEventListener('DOMContentLoaded', function() {  \n";
    224         echo "      var mi = document.getElementById('".$id."'); \n";
    225         echo "      var w =  mi.clientWidth;\n";
    226         echo "      var h =  mi.clientHeight;\n";
     221   
     222        echo "<img $idstr $mystyle src='' />
     223              <script> document.addEventListener('DOMContentLoaded', function() {
     224                    var mi = document.getElementById('".$id."');
     225                    var w =  mi.clientWidth;
     226                    var h =  mi.clientHeight;\n";
     227                   
    227228        echo "      if(w>h) { if (w > 640) { h = parseInt((640/w) * h); w = 640; } ";
    228229        echo " } else { if (h > 640){ w = parseInt(640/h * w);  h=640; } }\n ";
     
    233234        echo " var src ='https://maps.googleapis.com/maps/api/staticmap?center=$lat,$long&zoom=$zoom&maptype=".strtolower($type)."&key=".$key.$icon."&size='+ w+'x'+h;\n";
    234235        echo "mi.src = src;}";
    235         echo "); ";
    236         echo "</script>";
     236        echo ");
     237                </script>";
    237238        }
    238239    else {
     
    11941195            }
    11951196            jQuery(document).ready(function() { 
    1196        
    1197                 jQuery("#mapcontrolform").submit(function(e){ e.preventDefault(); });
    1198                  
     1197           
     1198                jQuery('#ia-map-meta-box').keypress(function(e){
     1199                    if ( e.which == 13 ) // Enter key = keycode 13
     1200                    {
     1201                        return false;
     1202                    }
     1203                });
     1204         
    11991205                wid = 'ia-map-meta-box';
    12001206                wod = document.getElementById(wid);
  • ia-map-analytics-basic/trunk/readme.txt

    r1782310 r1857938  
    3939 
    40401. Upload `plugin-name.php` to the `/wp-content/plugins/` directory
    41 1. Activate the plugin through the 'Plugins' menu in WordPress
    42 1. Use the button in the sidebar to set your map key.
     412. Activate the plugin through the 'Plugins' menu in WordPress
     423. Use the button in the sidebar to set your map key.
    4343 
    4444== Frequently Asked Questions ==
     
    6060== Changelog ==
    6161= 20171120 =
     62* Fixed error with icons which are asymmetric not loading (induced by change in googles api - they now adjust automatically instead of requiring custom onload for the image)
     63= 20171120 =
    6264* Initial Published Version.
    6365 
Note: See TracChangeset for help on using the changeset viewer.