+++ /dev/null
-#area-map-container{padding:0 10px;text-align:center;margin-bottom:25px;width:70vw;margin:0 auto;position:relative;left:-7%}#area-map-container #area-map{z-index:0;height:550px;box-shadow:0 -5px 20px rgba(0,0,0,0.19),0 6px 6px rgba(0,0,0,0.23)}.glm-theme-map-label{display:block;width:105px}@media (max-width: 1024px){#area-map-container{overflow:hidden;min-height:420px}#area-map-container #area-map{position:relative}}
--- /dev/null
+#area-map-container{padding:0 10px;text-align:center;margin-bottom:25px;width:100%;margin:0 auto;position:relative}#area-map-container #area-map{z-index:0;height:550px;box-shadow:0 -5px 20px rgba(0,0,0,0.19),0 6px 6px rgba(0,0,0,0.23)}.glm-theme-map-label{display:block;width:105px}@media (max-width: 1024px){#area-map-container{overflow:hidden;min-height:420px}#area-map-container #area-map{position:relative}}
// includePaths: sassPaths ,
outputStyle: 'compressed'
})).on('error', swallowError)
- .pipe(rename('front.min.css'))
+ .pipe(rename('glm-county-map.min.css'))
.pipe(gulp.dest('css'))
});
$pages[$page->ID]['name'] = $page->post_title;
$pages[$page->ID]['url'] = get_permalink($page->ID);
}
- wp_enqueue_style('admin-css', GLM_MEMBERS_COUNTY_MAP_PLUGIN_URL . 'css/front.min.css');
+ add_action( 'wp_enqueue_scripts', 'register_plugin_styles' );
+
+ function register_plugin_styles() {
+
+ wp_register_style('front-css', GLM_MEMBERS_COUNTY_MAP_PLUGIN_URL . 'css/glm-county-map.min.css');
+ wp_enqueue_style('front-css');
+ }
+
// Compile template data
$templateData = array(
'assets' => GLM_MEMBERS_COUNTY_MAP_PLUGIN_URL . 'assets/',
<div id="area-map"></div>
</div>
-<link rel="stylesheet" href="https://unpkg.com/leaflet@1.3.3/dist/leaflet.css" integrity="sha512-Rksm5RenBEKSKFjgI3a41vrjkw4EVPlJ3+OiI65vTjIdo9brlAacEuKOiQ5OFh7cOI1bkDwLqdLw3Zg0cRJAAQ==" crossorigin=""/>
-<script src="https://unpkg.com/leaflet@1.3.3/dist/leaflet.js" integrity="sha512-tAGcCfR4Sc5ZP5ZoVz0quoZDYX5aCtEm/eu1KhSLj2c9eFrylXZknQYmxUssFaVJKvvc0dJQixhGjG2yXWiV9Q==" crossorigin=""></script>
-<link rel="stylesheet" href="//unpkg.com/leaflet-gesture-handling/dist/leaflet-gesture-handling.min.css" type="text/css">
-<script src="//unpkg.com/leaflet-gesture-handling"></script>
+<!-- <link rel="stylesheet" href="https://unpkg.com/leaflet@1.3.3/dist/leaflet.css" integrity="sha512-Rksm5RenBEKSKFjgI3a41vrjkw4EVPlJ3+OiI65vTjIdo9brlAacEuKOiQ5OFh7cOI1bkDwLqdLw3Zg0cRJAAQ==" crossorigin=""/> -->
+<!-- <script src="https://unpkg.com/leaflet@1.3.3/dist/leaflet.js" integrity="sha512-tAGcCfR4Sc5ZP5ZoVz0quoZDYX5aCtEm/eu1KhSLj2c9eFrylXZknQYmxUssFaVJKvvc0dJQixhGjG2yXWiV9Q==" crossorigin=""></script> -->
+<!-- <link rel="stylesheet" href="//unpkg.com/leaflet-gesture-handling/dist/leaflet-gesture-handling.min.css" type="text/css">
+<script src="//unpkg.com/leaflet-gesture-handling"></script> -->
<script>
jQuery(function($){
// Create map with default center and size
- var countyMap = L.map('area-map').setView([46.5, -87.0], 8);
+ var countyMap = L.map('area-map').setView([46.6, -87.0], 8);
var countiesDirectory = '{$assets}/counties/';
// Tile Server URL
- tileServer = 'https://maps.gaslightmedia.com/12312029-NoPlaceNames-95bfebd37e9e7d649daafa8762629084/'+ {literal}'{z}/{x}/{y}.png'{/literal};
+ var tileServer = 'https://maps.gaslightmedia.com/12312029-NoPlaceNames-95bfebd37e9e7d649daafa8762629084/'+ {literal}'{z}/{x}/{y}.png'{/literal};
// Create Tile layer
L.tileLayer(tileServer, {
var page = "#";
var location = areas.filter( function(area){
return area.area_name == county;
- })
+ });
+
location = location[0];
if(parseInt(location.page_id)){
page = pages[location.page_id]['url'];