Skip to content

Instantly share code, notes, and snippets.

View skorasaurus's full-sized avatar

Will Skora skorasaurus

View GitHub Profile
@skorasaurus
skorasaurus / functions.php
Last active February 15, 2019 14:57
my-mapbox-code.js is a ; Is using shortcodes a best practice? ; why can't I just bind it other more complex examples are at https://www.mapbox.com/mapbox.js/example/v1.0.0/markercluster-custom-polygon-appearance/
function enqueue_scripts() {
/**
you can remove the if statement if you want the script to load on all pages;
locations is the page's slug
*/
if (is_page( 'locations' )) {
wp_register_style('mapbox_css', 'https://api.mapbox.com/mapbox.js/v3.1.1/mapbox.css');
wp_register_script('mapbox_js', 'https://api.mapbox.com/mapbox.js/v3.1.1/mapbox.js', '', '', true);
MMMMMMMMMMMMMMMMMMMMMMMMMMM~====MMMMMMMM
MMMMMMMMMMMMMMMMMMMMMMMMM=============MM
MMMMMMMMMMMMMMMMMMMMMM================MM
MMMMMMMMMMMMMMMMMMM===================MM
MDMMMMMMMZ==~MMM======================MM
M=====================================MM
M======================================M
M=====================================MM
M=====================================MM
(also at https://gist.github.com/c6c460c8d24f96bca0c68fe623765060)
we're at an interesting crossroads because of vector tiles (not everyone needs to use them just yet);
they do offer some performance gains and it really depends on the tools;
why vector tiles:
quickly change the map style > no need to make new tiles!
<!DOCTYPE html>
<html>
<head>
<meta charset=utf-8 />
<meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no">
<title>test</title>
<!-- <link rel="stylesheet" href="dist/leaflet.css">
<script src="dist/leaflet.js"></script> -->
<link rel="stylesheet" href="https://unpkg.com/leaflet@1.6.0/dist/leaflet.css" />
<script src="https://unpkg.com/leaflet@1.6.0/dist/leaflet.js"></script>
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
JQMIGRATE: Migrate is installed with logging active, version 1.4.1 jquery-migrate.js:23:2
Download the React DevTools for a better development experience: https://fb.me/react-devtools react-dom.24169eaf.js:17988:9
value prop in color objects passed by withColors HOC is deprecated and will be removed from Gutenberg in 3.9. Please use `color` prop passed in the object instead. Note: This is a global warning, shown regardless of whether value prop is used. index.js:1:5643
Warning: Unsafe lifecycle methods were found within a strict-mode tree:
in Unknown (created by r)
in r (created by RemountOnPropChange(r))
in RemountOnPropChange(r)
in WithSelect(Component)
componentWillReceiveProps: Please update the following components to use static getDerivedStateFromProps instead: t
diff --git a/package-lock.json b/package-lock.json
index dc17854..6a7a2b9 100644
--- a/package-lock.json
+++ b/package-lock.json
@@ -8260,12 +8260,14 @@
"balanced-match": {
"version": "1.0.0",
"bundled": true,
- "dev": true
+ "dev": true,
@skorasaurus
skorasaurus / gist:cbecd264daa91730a9d624c3249dc98d
Created August 23, 2018 18:14
added to themetwentyseventeentheme's functions.php ; after added to a new post; my_shortcode is just echo'ed as a paragraph.
function shortcode_example_func() {
echo 'hi mom, look, no hands!';
}
add_shortcode('my_shortcode', 'shortcode_example_func');
@skorasaurus
skorasaurus / gist:a1beda1ad4f7541a1e8b7a8b395acfe3
Last active November 19, 2018 05:12
intro to web maps outline
Walk away with the ability to know what is going into a web map; and make a web map
ultimately; I think I need to focus on:
(focus more on interaction or creating a web base map?)
BUT GLITCH!
1. What are web maps (characteristics)?