Uso de mapas de mapbox para la creación de markers

This commit is contained in:
lrullo 2018-11-12 17:13:42 +01:00
parent fc5b82481c
commit a1c75ce154

View File

@ -172,11 +172,11 @@ if (!class_exists('Soundmap')){
- LeafletCSS
*/
//wp_enqueue_script( 'google-maps', 'http://maps.google.com/maps/api/js?v=3.7&sensor=false' ); // Google Maps
wp_enqueue_script('mapboxjs','https://api.mapbox.com/mapbox.js/v2.2.4/mapbox.js',array(),'2.2.4',TRUE); // add Leaflet.js
//wp_enqueue_script('leafletjs','http://cdn.leafletjs.com/leaflet-0.7.2/leaflet.js',array(),'0.7.2',TRUE); // add Leaflet.js
wp_enqueue_style('mapboxcss','https://api.mapbox.com/mapbox.js/v2.2.4/mapbox.css',array(),'2.2.4','all'); // add CSS Leaflet
//wp_enqueue_style('leafletcss','http://cdn.leafletjs.com/leaflet-0.7.2/leaflet.css',array(),'0.7.2','all'); // add CSS Leaflet
wp_enqueue_script('leaflet-plugin-google', plugins_url('js/leaflet/plugins/Google.js', __FILE__), array('leafletjs', 'google-maps'), '0.7.2', TRUE);
//wp_enqueue_script('mapboxjs','https://api.mapbox.com/mapbox.js/v2.2.4/mapbox.js',array(),'2.2.4',TRUE); // add Leaflet.js
wp_enqueue_script('leafletjs','https://unpkg.com/leaflet@1.3.4/dist/leaflet.js',array(),'1.3.4',TRUE); // add Leaflet.js
//wp_enqueue_style('mapboxcss','https://api.mapbox.com/mapbox.js/v2.2.4/mapbox.css',array(),'2.2.4','all'); // add CSS Leaflet
wp_enqueue_style('leafletcss',"https://unpkg.com/leaflet@1.3.4/dist/leaflet.css",array(),'1.3.4','all'); // add CSS Leaflet
//wp_enqueue_script('leaflet-plugin-google', plugins_url('js/leaflet/plugins/Google.js', __FILE__), array('leafletjs', 'google-maps'), '0.7.2', TRUE);
}
function wp_enqueue_scripts(){
@ -214,6 +214,7 @@ if (!class_exists('Soundmap')){
}else if($hook == 'settings_page_soundmap-options-menu'){
$this->enqueue_map_scripts();
wp_enqueue_script('underscore');
wp_enqueue_script('soundmap-config', plugins_url('js/soundmap.config.js', __FILE__), array(), '0.1', TRUE);
wp_enqueue_style('soundmap-config-css', plugins_url('css/soundmap.config.css', __FILE__), array(), '0.1', 'all');