| @@ -17,8 +17,13 @@ | ||
| 17 | 17 | to { |
| 18 | 18 | stroke-dashoffset: -1000; |
| 19 | 19 | } |
| 20 | 20 | } |
| 21 | + | |
| 22 | + /* wordpress messes up video tags */ | |
| 23 | + video { | |
| 24 | + max-width: inherit; | |
| 25 | + } | |
| 21 | 26 | </style> |
| 22 | 27 | |
| 23 | 28 | <div class="wrap"> |
| 24 | 29 | <h2>Shortcode Helper</h2> |
| @@ -32,14 +37,14 @@ | ||
| 32 | 37 | )); |
| 33 | 38 | ?> |
| 34 | 39 | <div class="wrap"> |
| 35 | 40 | <hr> |
| 36 | - <h2><?php _e('Interactive Shortcodes:', 'leaflet-map'); ?></h2> | |
| 37 | - <p class="description"><?php _e('Move the map and the marker to generate shortcodes below:', 'leaflet-map'); ?></p> | |
| 38 | - <div class="flex"><label class="h3" for="map-shortcode"><?php _e('Map Shortcode', 'leaflet-map'); ?></label> <input type="text" id="map-shortcode" readonly="readonly" /></div> | |
| 39 | - <div class="flex"><label class="h3" for="marker-shortcode"><?php _e('Marker Shortcode', 'leaflet-map'); ?></label> <input type="text" id="marker-shortcode" readonly="readonly" /></div> | |
| 41 | + <h2><?php esc_html_e('Interactive Shortcodes:', 'leaflet-map'); ?></h2> | |
| 42 | + <p class="description"><?php esc_html_e('Move the map and the marker to generate shortcodes below:', 'leaflet-map'); ?></p> | |
| 43 | + <div class="flex"><label class="h3" for="map-shortcode"><?php esc_html_e('Map Shortcode', 'leaflet-map'); ?></label> <input type="text" id="map-shortcode" readonly="readonly" /></div> | |
| 44 | + <div class="flex"><label class="h3" for="marker-shortcode"><?php esc_html_e('Marker Shortcode', 'leaflet-map'); ?></label> <input type="text" id="marker-shortcode" readonly="readonly" /></div> | |
| 40 | 45 | <hr> |
| 41 | - <h2><?php _e('Examples', 'leaflet-map'); ?>:</h2> | |
| 46 | + <h2><?php esc_html_e('Examples', 'leaflet-map'); ?>:</h2> | |
| 42 | 47 | <div class="examples"> |
| 43 | 48 | <?php |
| 44 | 49 | $examples = array( |
| 45 | 50 | __("Standard", 'leaflet-map') => array( |
| @@ -55,9 +60,9 @@ | ||
| 55 | 60 | '[leaflet-map zoom=8 lat=-33.85 lng=151.21 scrollwheel]', |
| 56 | 61 | '[leaflet-marker draggable]', |
| 57 | 62 | ), |
| 58 | 63 | __("Marker Icon", 'leaflet-map') => array( |
| 59 | - '[leaflet-map zoom=14 address="Ha Ling, canmore" scrollwheel]', | |
| 64 | + '[leaflet-map zoom=14 address="Ha Ling, canmore" scrollwheel !detect-retina show_scale]', | |
| 60 | 65 | '[leaflet-marker iconUrl="https://i.imgur.com/Q54ueuO.png" iconSize="80,50" iconAnchor="40,60"]' |
| 61 | 66 | ), |
| 62 | 67 | __("SVG Marker Icon", 'leaflet-map') => array( |
| 63 | 68 | '[leaflet-map address="twilight lane, nova scotia" scrollwheel]', |
| @@ -63,19 +68,16 @@ | ||
| 63 | 68 | '[leaflet-map address="twilight lane, nova scotia" scrollwheel]', |
| 64 | 69 | '[leaflet-marker svg background="#777" iconClass="dashicons dashicons-star-filled" color="gold"]My Favorite Place in the World[/leaflet-marker]' |
| 65 | 70 | ), |
| 66 | 71 | __("Zoom Buttons", 'leaflet-map') => array( |
| 67 | - '[leaflet-map zoom=9 lat=48.855 lng=2.35 zoomcontrol]', | |
| 72 | + '[leaflet-map zoom=10 lat=48.855 lng=2.35 zoomcontrol !detect-retina]', | |
| 68 | 73 | ), |
| 69 | - __("Alternate Map Tiles w/scrollwheel", 'leaflet-map') => array( | |
| 70 | - '[leaflet-map zoom=2 scrollwheel lat=-2.507 lng=32.902 tileurl=https://stamen-tiles-{s}.a.ssl.fastly.net/watercolor/{z}/{x}/{y}.jpg subdomains=abcd attribution="Map tiles by Stamen Design, under CC BY 3.0."]', | |
| 71 | - ), | |
| 72 | 74 | __("Marker Popup Messages (on click)", 'leaflet-map') => array( |
| 73 | 75 | '[leaflet-map lat=59.913 lng=10.739 zoom=12]', |
| 74 | 76 | '[leaflet-marker]OSLO![/leaflet-marker]', |
| 75 | 77 | ), |
| 76 | 78 | __("Links In Marker Messages (visible)", 'leaflet-map') => array( |
| 77 | - '[leaflet-map lat=28.41 lng=-81.58 zoom=15]', | |
| 79 | + '[leaflet-map lat=28.41 lng=-81.58 zoom=15 detect-retina]', | |
| 78 | 80 | '[leaflet-marker visible] Disney World! <a href="https://disneyworld.disney.go.com">Link</a> [/leaflet-marker]', |
| 79 | 81 | ), |
| 80 | 82 | __("Basic Lines w/Scrollwheel", 'leaflet-map') => array( |
| 81 | 83 | '[leaflet-map lat=41 lng=29 scrollwheel zoom=6]', |
| @@ -85,10 +87,11 @@ | ||
| 85 | 87 | '[leaflet-map fitbounds]', |
| 86 | 88 | '[leaflet-polygon addresses="Miami; San Juan; Bermuda" color="green" fillColor="yellow"]<a href="https://en.wikipedia.org/wiki/Bermuda_Triangle" target="_blank">Bermuda Triangle</a>[/leaflet-polygon]' |
| 87 | 89 | ), |
| 88 | 90 | __("Basic Circle", 'leaflet-map') => array( |
| 89 | - '[leaflet-map lat=52 lng=5 zoom=9]', | |
| 90 | - '[leaflet-circle lat=52 lng=5 radius=17500]' | |
| 91 | + '[leaflet-map lat=52 lng=5 zoom=8.2 zoomcontrol !show_scale]', | |
| 92 | + '[leaflet-circle lat=52 lng=5 radius=17500]', | |
| 93 | + '[leaflet-scale position=topright]' | |
| 91 | 94 | ), |
| 92 | 95 | __("Fitted Colored Line on Addresses", 'leaflet-map') => array( |
| 93 | 96 | '[leaflet-map fitbounds]', |
| 94 | 97 | '[leaflet-line color="purple" addresses="Sayulita; Puerto Vallarta;"]' |
| @@ -97,9 +100,9 @@ | ||
| 97 | 100 | '[leaflet-map fitbounds]', |
| 98 | 101 | '[leaflet-line color="red" weight=10 dasharray="2,15" addresses="Halifax, Nova Scotia; Tanzania" classname=marching-ants]' |
| 99 | 102 | ), |
| 100 | 103 | __("Disable all Interaction", 'leaflet-map') => array( |
| 101 | - '[leaflet-map address="las vegas" !boxZoom !doubleClickZoom !dragging !keyboard !scrollwheel !attribution !touchZoom]', | |
| 104 | + '[leaflet-map address="las vegas" !boxZoom !doubleClickZoom !dragging !keyboard !scrollwheel !attribution !touchZoom !show_scale]', | |
| 102 | 105 | ), |
| 103 | 106 | __("Add GeoJSON by URL", 'leaflet-map') => array( |
| 104 | 107 | '[leaflet-map fitbounds scrollwheel]', |
| 105 | 108 | '[leaflet-geojson src=https://gist.githubusercontent.com/bozdoz/064a7101b95a324e8852fe9381ab9a18/raw/ee100561f5a0a8cf55430e9f2157e4a1e2560a2e/map.geojson]' |
| @@ -121,9 +124,20 @@ | ||
| 121 | 124 | ), |
| 122 | 125 | __("Image Map", 'leaflet-map') => array( |
| 123 | 126 | '[leaflet-image zoom=1 zoomcontrol scrollwheel !attribution]', |
| 124 | 127 | '[leaflet-marker draggable]' |
| 125 | - ), | |
| 128 | + ), | |
| 129 | + __("Image Overlay Map", 'leaflet-map') => array( | |
| 130 | + '[leaflet-map fitbounds]', | |
| 131 | + '[leaflet-image-overlay]', | |
| 132 | + ), | |
| 133 | + __("Video Overlay Map", 'leaflet-map') => array( | |
| 134 | + '[leaflet-map fitbounds]', | |
| 135 | + '[leaflet-video-overlay]', | |
| 136 | + ), | |
| 137 | + __("WMS Map", 'leaflet-map') => array( | |
| 138 | + '[leaflet-wms zoomControl zoom=5 lat=38.9252 lng=35.33203 attribution="For Those of Us in Turkey"]', | |
| 139 | + ), | |
| 126 | 140 | ); |
| 127 | 141 | |
| 128 | 142 | foreach ($examples as $title => $collection) { |
| 129 | 143 | echo '<div class="list-item">'; |