Skip to content

Instantly share code, notes, and snippets.

View randy-allen's full-sized avatar

Randy Allen randy-allen

View GitHub Profile
@randy-allen
randy-allen / Geocoder.php
Created June 12, 2019 20:54
A version of spatie/geocoder that uses dev.virtualearth.net instead of Google Maps API
<?php
namespace Spatie\Geocoder;
use GuzzleHttp\Client;
use Spatie\Geocoder\Exceptions\CouldNotGeocode;
class Geocoder
{
const RESULT_NOT_FOUND = 'result_not_found';
class Svg {
constructor(name) {
let div = document.createElement('div');
div.innerHTML = require('../../../../public/img/svg/' + name + '.svg'); // change to wherever your svg files are
let fragment = document.createDocumentFragment();
fragment.appendChild(div);
this.svg = fragment.querySelector('svg');
}