Changeset 1947610
- Timestamp:
- 09/26/2018 07:31:39 PM (8 years ago)
- Location:
- map-pins/trunk
- Files:
-
- 5 edited
-
include/mappins.php (modified) (3 diffs)
-
js/mappins-admin.js (modified) (2 diffs)
-
js/mappins.js (modified) (2 diffs)
-
map-pins.php (modified) (1 diff)
-
readme.txt (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
-
map-pins/trunk/include/mappins.php
r1947523 r1947610 105 105 'pics_base_url'=>MAPPINS_PICS_URL.'/markers/', 106 106 'showbar'=>$this->showbar, 107 'googlekey'=>$this->get_configuration_option('googlekey'), 107 108 'defcountrycode'=>$this->get_configuration_option('defcountry'), 108 109 'defcountryname'=> xcos_country::getCoutryName($this->get_configuration_option('defcountry'),'nodomain'), // default extension for country name … … 313 314 <table class="form-table"><?php 314 315 xcos::TrFormInput('adminmenu',__('Admin menu name:','mappins'),xcos::ifset($options['adminmenu'],'Map pins'),['size'=>40]); 315 xcos::TrFormInput('googlekey',__('Google api key:','mappins'),xcos::ifset($options['googlekey'],'YOUR-GOOGLE-API-KEY'),['size'=>60]); 316 xcos::TrFormInput('googlekey',__('Google Maps Api key:','mappins'),xcos::ifset($options['googlekey'],'GOOGLE-API-KEY'),['size'=>60]); 317 echo "<div>Get your <a href='https://developers.google.com/maps/documentation/javascript/get-api-key'>google maps API key</a></div>"; 316 318 xcos::TrFormInput('categories',__('Categories:<br>(comma separated list)', 'mappins'),xcos::ifset($options['categories'],'first,second'),array('size'=>40)); 317 319 xcos::TrFormSelect('defcountry',__('Default country', 'mappins'),xcos::ifset($options['defcountry'],'NL'),xcos_country::getCountries()); … … 328 330 ?> 329 331 <div class="wrap"> 332 <h3>Google maps API key</h3> 333 A google API key is now required. Please protect your key by restricting it to your domain, because web site traffic to google maps can be very expensive!<br> 334 Please get your <a href='https://developers.google.com/maps/documentation/javascript/get-api-key'>google maps API key</a> before using this plugin. 335 330 336 <h3>Shortcuts</h3> 331 337 <ul> -
map-pins/trunk/js/mappins-admin.js
r811030 r1947610 59 59 center: new google.maps.LatLng(lat,lng), 60 60 zoom: zoom, 61 mapTypeId: google.maps.MapTypeId.ROADMAP 61 mapTypeId: google.maps.MapTypeId.ROADMAP, 62 gestureHandling: 'greedy', 62 63 }; 63 64 thisC.mymap = new google.maps.Map(document.getElementById("mappins-editloc"), mapOptions); … … 149 150 var script=document.createElement('script'); 150 151 script.type = "text/javascript"; 151 script.src='http://maps.google.com/maps/api/js? sensor=false'+'&libraries=places&callback=mappins_admin'; // use this callback!152 script.src='http://maps.google.com/maps/api/js?key='+mappins_options.googlekey+'&libraries=places&callback=mappins_admin'; // use this callback! 152 153 document.body.appendChild(script); 153 154 } -
map-pins/trunk/js/mappins.js
r1947502 r1947610 25 25 center: new google.maps.LatLng(-34.397, 150.644), 26 26 zoom: 9, 27 mapTypeId: google.maps.MapTypeId.ROADMAP 27 mapTypeId: google.maps.MapTypeId.ROADMAP, 28 gestureHandling: 'greedy', 29 28 30 }; 29 31 map = new google.maps.Map(document.getElementById("mappins-map"), … … 74 76 var script=document.createElement('script'); 75 77 script.type = "text/javascript"; 76 script.src='http://maps.google.com/maps/api/js?key= APIKEY_HERE&libraries=places&callback=mappins_init';78 script.src='http://maps.google.com/maps/api/js?key='+mappins_options.googlekey+'&libraries=places&callback=mappins_init'; 77 79 document.body.appendChild(script); 78 80 } -
map-pins/trunk/map-pins.php
r1947598 r1947610 4 4 * Plugin URI: http://mappins.innovader.nl 5 5 * Description: Show pins on a map from an admin defined table 6 * Version: 1. 036 * Version: 1.10 7 7 * Author: Innovader BV 8 8 * Author URI: http://innovader.nl -
map-pins/trunk/readme.txt
r1947526 r1947610 92 92 = 1.02 = 93 93 * fixed short php tags 94 * apikey for google map95 94 * tested with latest wordpress version 95 = 1.10 = 96 * Added required Google Maps API key 96 97 97 98 == Upgrade Notice == … … 103 104 = 1.01 = 104 105 * bugfixes 105 = 1.02 = 106 * google api key added 107 * fixed some issues 106 = 1.10 = 107 * Google Maps Api Key is now required. 108 108 109 109
Note: See TracChangeset
for help on using the changeset viewer.