Changeset 2481787
- Timestamp:
- 02/25/2021 08:58:08 PM (5 years ago)
- Location:
- osm-map-elementor
- Files:
-
- 1 added
- 6 edited
-
tags/1.0.5/osm-map-elementor.php (modified) (1 diff)
-
tags/1.0.5/readme.txt (modified) (1 diff)
-
trunk/README.md (modified) (1 diff)
-
trunk/assets/css/osm-map-elementor.css (added)
-
trunk/osm-map-elementor.php (modified) (2 diffs)
-
trunk/osm-map.php (modified) (9 diffs)
-
trunk/readme.txt (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
-
osm-map-elementor/tags/1.0.5/osm-map-elementor.php
r2451082 r2481787 3 3 * Plugin Name: OSM Map Widget for Elementor 4 4 * Description: A free Elementor Map Widget that Utilizes Open Street Map. Comes with features like adding multiple markers, and choosing from a library of custom tiles to change the look and feel. 5 * Author: ACT Innovate , James Arama, Alex Hooten5 * Author: ACT Innovate 6 6 * Author URI: https://github.com/flopperj/elementor-osm-map 7 7 * Version: 1.0.5 -
osm-map-elementor/tags/1.0.5/readme.txt
r2451404 r2481787 2 2 Plugin Name: OSM Map Widget for Elementor 3 3 Version: 1.0.5 4 Author: ACT Innovate , James Arama, Alex Hooten4 Author: ACT Innovate 5 5 Author URI: https://github.com/flopperj/osm-map-elementor 6 6 Tags: elementor, elementor widget, map widget, open street map, addons -
osm-map-elementor/trunk/README.md
r2451062 r2481787 2 2 A free Elementor Map Widget that utilizes [Open Street Map](https://www.openstreetmap.org/). Comes with features like adding multiple markers, and choosing from a library of custom tiles to change the look and feel. Requires [Elementor Page Builder](https://wordpress.org/plugins/elementor/) Plugin Version: 3.0.5+ 3 3 4 This plugin is [open sourced](https://github.com/flopperj/osm-map-elementor) so feel free to contribute to it :) 4 This plugin is [open sourced](https://github.com/flopperj/osm-map-elementor) so feel free to contribute to it by: 5 1. Adding a topic/issue [here](https://github.com/flopperj/osm-map-elementor/issues) 6 2. Submitting a pull request with any well-written code that implements the desired feature. 5 7 6 8 ## Usage -
osm-map-elementor/trunk/osm-map-elementor.php
r2451062 r2481787 3 3 * Plugin Name: OSM Map Widget for Elementor 4 4 * Description: A free Elementor Map Widget that Utilizes Open Street Map. Comes with features like adding multiple markers, and choosing from a library of custom tiles to change the look and feel. 5 * Author: ACT Innovate , James Arama, Alex Hooten5 * Author: ACT Innovate 6 6 * Author URI: https://github.com/flopperj/elementor-osm-map 7 * Version: 1.0. 57 * Version: 1.0.6 8 8 */ 9 9 … … 122 122 <input type="checkbox" name="osm_widget[enable_fontawesome]" 123 123 value="1" 124 <?php echo!array_key_exists('enable_fontawesome', $osm_settings) || !empty($osm_settings['enable_fontawesome']) ? "checked='checked'" : null; ?>>124 <?php echo is_array($osm_settings) && !array_key_exists('enable_fontawesome', $osm_settings) || !empty($osm_settings['enable_fontawesome']) ? "checked='checked'" : null; ?>> 125 125 <span class="slider round"></span> 126 126 </label> -
osm-map-elementor/trunk/osm-map.php
r2451082 r2481787 183 183 184 184 $repeater->add_control( 185 'marker_behavior', 186 [ 187 'label' => __('Behavior', self::$slug), 188 'type' => \Elementor\Controls_Manager::SELECT, 189 'default' => 'popup', 190 'options' => [ 191 'popup' => 'Popup', 192 'tooltip' => 'Tooltip', 193 'none' => 'None' 194 ] 195 ] 196 ); 197 198 $repeater->add_control( 185 199 'show_button', 186 200 [ … … 225 239 ); 226 240 241 227 242 $this->start_controls_section( 228 243 'section_map', … … 244 259 'zoom', 245 260 [ 246 'label' => __('Zoom ', self::$slug),261 'label' => __('Zoom Level', self::$slug), 247 262 'type' => \Elementor\Controls_Manager::SLIDER, 248 263 'default' => [ … … 256 271 ], 257 272 'separator' => 'before', 273 ] 274 ); 275 276 $this->add_control( 277 'zoom_control', 278 [ 279 'label' => __('Zoom Control', self::$slug), 280 'type' => \Elementor\Controls_Manager::SWITCHER, 281 'label_on' => __('Enable', self::$slug), 282 'label_off' => __('Disable', self::$slug), 283 'return_value' => 'yes', 284 'default' => 'yes' 285 ] 286 ); 287 288 $this->add_control( 289 'scroll_zoom', 290 [ 291 'label' => __('Scroll Zoom', self::$slug), 292 'type' => \Elementor\Controls_Manager::SWITCHER, 293 'label_on' => __('Enable', self::$slug), 294 'label_off' => __('Disable', self::$slug), 295 'return_value' => 'yes', 296 'default' => 'yes' 297 ] 298 ); 299 300 301 $this->add_control( 302 'pan_control', 303 [ 304 'label' => __('Pan Control', self::$slug), 305 'type' => \Elementor\Controls_Manager::SWITCHER, 306 'label_on' => __('Enable', self::$slug), 307 'label_off' => __('Disable', self::$slug), 308 'return_value' => 'yes', 309 'default' => 'yes', 310 'separator' => 'after' 258 311 ] 259 312 ); … … 1327 1380 class="osm-map-container" 1328 1381 data-center="' . implode(',', $center_coords) . '" 1329 data-zoom="' . $settings['zoom']['size'] . '" 1330 data-markers=\'' . json_encode($coords) . '\'></div>'; 1382 data-zoom="' . $settings['zoom']['size'] . '"></div>'; 1331 1383 ?> 1332 1384 <script type="text/javascript"> … … 1343 1395 } 1344 1396 1345 const map = L.map(mapId); 1397 const map = L.map(mapId, { 1398 scrollWheelZoom: <?php echo !empty($settings['scroll_zoom']) ? 'true' : 'false'; ?>, 1399 zoomControl: <?php echo !empty($settings['zoom_control']) ? 'true' : 'false'; ?>, 1400 dragging: <?php echo !empty($settings['pan_control']) ? 'true' : 'false'; ?> 1401 }); 1346 1402 1347 1403 if (center) { … … 1367 1423 1368 1424 // add available markers 1369 const markers = jQuery(mapContainer).data('markers');1425 const markers = <?php echo json_encode($coords); ?>; 1370 1426 let markerIcon = null; 1371 1427 let markerOptions = {}; … … 1514 1570 tooltipContent += '</div>'; 1515 1571 1516 // add tooltip to marker1572 // add tooltip / popup to marker 1517 1573 if (this.marker.marker_title || this.marker.marker_description || this.marker.button_text && this.marker.show_button) { 1518 marker.bindPopup(tooltipContent); 1574 let markerBehavior = this.marker.hasOwnProperty('marker_behavior') ? this.marker.marker_behavior : null; 1575 switch (markerBehavior) { 1576 case 'popup': 1577 marker.bindPopup(tooltipContent); 1578 break; 1579 case 'tooltip': 1580 1581 let tooltipOptions = {}; 1582 1583 <?php if($icon_type == 'fontawesome'): ?> 1584 // update offset for fontawesome markers 1585 tooltipOptions.direction = "top"; 1586 tooltipOptions.offset = [0, -50]; 1587 <?php endif; ?> 1588 1589 marker.bindTooltip(tooltipContent, tooltipOptions); 1590 break; 1591 1592 } 1519 1593 } 1520 1594 }); … … 1583 1657 'mapbox-gl' => plugins_url('/osm-map-elementor/assets/css/mapbox-gl.css'), 1584 1658 'leaflet-fa-markers' => plugins_url('/osm-map-elementor/assets/leaflet-fa-markers/L.Icon.FontAwesome.css'), 1659 'osm-map-elementor' => plugins_url('/osm-map-elementor/assets/css/osm-map-elementor.css') 1585 1660 ]; 1586 1661 -
osm-map-elementor/trunk/readme.txt
r2451404 r2481787 1 1 === OSM Map Widget for Elementor === 2 2 Plugin Name: OSM Map Widget for Elementor 3 Version: 1.0. 54 Author: ACT Innovate , James Arama, Alex Hooten3 Version: 1.0.6 4 Author: ACT Innovate 5 5 Author URI: https://github.com/flopperj/osm-map-elementor 6 6 Tags: elementor, elementor widget, map widget, open street map, addons … … 15 15 A free Elementor Map Widget that utilizes [Open Street Map](https://www.openstreetmap.org/). Comes with features like adding multiple markers, and choosing from a library of custom tiles to change the look and feel. Requires [Elementor Page Builder](https://wordpress.org/plugins/elementor/) Plugin Version: 3.0.5+ 16 16 17 This plugin is [open sourced](https://github.com/flopperj/osm-map-elementor) so feel free to contribute to it :) 17 This plugin is [open sourced](https://github.com/flopperj/osm-map-elementor) so feel free to contribute to it by: 18 1. Adding a topic/issue [here](https://github.com/flopperj/osm-map-elementor/issues) 19 2. Submitting a pull request with any well-written code that implements the desired feature. 18 20 19 21 ### Usage
Note: See TracChangeset
for help on using the changeset viewer.