Changeset 1857938
- Timestamp:
- 04/13/2018 02:57:45 PM (8 years ago)
- Location:
- ia-map-analytics-basic/trunk
- Files:
-
- 1 added
- 2 edited
-
geoxml.js (added)
-
ia-mapanalytics.php (modified) (4 diffs)
-
readme.txt (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
-
ia-map-analytics-basic/trunk/ia-mapanalytics.php
r1782840 r1857938 4 4 Plugin URI: http://www.4w.com/mapanalytics 5 5 Description: Easily create a map via a short code using uploaded KML or GeoJSON 6 Version: 2017 12066 Version: 20170413 7 7 Author: Information Analytics 8 8 Author URI: http://4w.com/ … … 219 219 220 220 $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 227 228 echo " if(w>h) { if (w > 640) { h = parseInt((640/w) * h); w = 640; } "; 228 229 echo " } else { if (h > 640){ w = parseInt(640/h * w); h=640; } }\n "; … … 233 234 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"; 234 235 echo "mi.src = src;}"; 235 echo "); ";236 echo "</script>";236 echo "); 237 </script>"; 237 238 } 238 239 else { … … 1194 1195 } 1195 1196 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 1199 1205 wid = 'ia-map-meta-box'; 1200 1206 wod = document.getElementById(wid); -
ia-map-analytics-basic/trunk/readme.txt
r1782310 r1857938 39 39 40 40 1. Upload `plugin-name.php` to the `/wp-content/plugins/` directory 41 1. Activate the plugin through the 'Plugins' menu in WordPress42 1. Use the button in the sidebar to set your map key.41 2. Activate the plugin through the 'Plugins' menu in WordPress 42 3. Use the button in the sidebar to set your map key. 43 43 44 44 == Frequently Asked Questions == … … 60 60 == Changelog == 61 61 = 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 = 62 64 * Initial Published Version. 63 65
Note: See TracChangeset
for help on using the changeset viewer.