From 1e9296d32e052619222eb89b65e06daa2de3eb35 Mon Sep 17 00:00:00 2001 From: steveoh Date: Thu, 30 Jan 2025 15:12:15 -0700 Subject: [PATCH] chore: remove blog posts with 3rd party cookies refs #2951 --- ...tandard-coordinate-systems-in-leafletjs.md | 33 ------------------- ...ick-javascript-tip-the-arguments-object.md | 19 ----------- 2 files changed, 52 deletions(-) delete mode 100644 src/content/blog/2013-11-26-using-base-maps-with-non-standard-coordinate-systems-in-leafletjs.md delete mode 100644 src/content/blog/2013-12-24-quick-javascript-tip-the-arguments-object.md diff --git a/src/content/blog/2013-11-26-using-base-maps-with-non-standard-coordinate-systems-in-leafletjs.md b/src/content/blog/2013-11-26-using-base-maps-with-non-standard-coordinate-systems-in-leafletjs.md deleted file mode 100644 index 09e3838c58..0000000000 --- a/src/content/blog/2013-11-26-using-base-maps-with-non-standard-coordinate-systems-in-leafletjs.md +++ /dev/null @@ -1,33 +0,0 @@ ---- -title: Using Base Maps with Non-standard Coordinate Systems in LeafletJS -author: Scott Davis -date: 2013-11-26 15:20:50 -0700 -category: Developer -tags: - - base maps - - javascript - - open source -cover_image: /src/images/pillar-blog/default-social-card.png -cover_image_alt: ugrc social card ---- - -

Since LeafletJS seems to be what all of the cool kids are using these days and it shows no signs of slowing down, I thought that it would be fun to figure out how to use Leaflet to view UGRC's awesome base map services. This presented a unique challenge since they are not in a projection that is supported out-of-the-box by Leaflet (UTM Zone 12 NAD83). However, I found that it is possible with the help of a few additional JavaScript libraries. So, here's the solution:

-

See the Pen Esri Leaflet (OLD) by Scott Davis (@stdavis) on CodePen.

- -

-You'll notice that I've loaded these libraries in addition to the latest version of Leaflet:

- -

-The implementation was not that complex once I got all of the numbers right. First I create a new Proj4Leaflet coordinate reference system which I pass into the map constructor. Then I use the Esri-Leaflet Plugin to set up a new TiledMapLayer and add it to the map.

-

-Now you can be one of the cool kids too!

- diff --git a/src/content/blog/2013-12-24-quick-javascript-tip-the-arguments-object.md b/src/content/blog/2013-12-24-quick-javascript-tip-the-arguments-object.md deleted file mode 100644 index e447fb6d15..0000000000 --- a/src/content/blog/2013-12-24-quick-javascript-tip-the-arguments-object.md +++ /dev/null @@ -1,19 +0,0 @@ ---- -title: 'Quick JavaScript Tip: The Arguments Object' -author: Scott Davis -date: 2013-12-24 06:55:10 -0700 -category: Developer -tags: - - javascript -cover_image: /src/images/pillar-blog/default-social-card.png -cover_image_alt: ugrc social card ---- - -

Recently, as I was slowly working my way through Rebecca Murphy's excellent js-assessment test suite, I ran into a problem that was quite vexing. I was creating a function that was to take an arbitrary number of arguments and combine them with an existing array. I thought that this would be as trivial as using the concat method on the existing array and passing in the arguments object. However, as you can see below, it didn't work.

-

See the Pen Arguments Concat Method by Scott Davis (@stdavis) on CodePen.

- -

For a while I thought that I must be using the concat method incorrectly. I tested it using the terminal again and again with no problems. Finally I recalled a recent issue from A Drip of JavaScript that talked about the arguments object. I remembered that Joshua said that the arguments object "isn't exactly an array, [but rather an] object that acts like an array." This means that you can't use it exactly like an array. An easy fix for the situation was to bind a call to the slice method on an empty array to the arguments object which converts it to a true array object like so:

-

See the Pen Arguments Slice by Scott Davis (@stdavis) on CodePen.

- -

Hopefully this will save you some time in the future.

-

Scott