Skip to content

Instantly share code, notes, and snippets.

View DGuidi's full-sized avatar
🏠
¯\_(ツ)_/¯

Diego Guidi DGuidi

🏠
¯\_(ツ)_/¯
  • Fano, Italy
View GitHub Profile
@DGuidi
DGuidi / Sample.razor
Created April 8, 2021 14:26
WmsLayer extension for [BlazorLeaflet](https://github.com/Mehigh17/BlazorLeaflet)
_map.AddLayer(new WmsLayer
{
UrlTemplate = "http://ows.mundialis.de/services/service?",
Layers = new string[] { "TOPO-WMS", "OSM-Overlay-WMS" }
});
@DGuidi
DGuidi / Setting.html
Last active June 6, 2022 05:24
an updated version of the code found in Digital Geography blog post - https://digital-geography.com/how-to-create-a-custom-web-appbuilder-widget-for-your-portal-with-ors/ - about how to create a simple ArcGIS Widget for a sample ArcGIS Widget
<div style="width: 100%; height: 100%">
<div class="settings-section">
<table class="setting-table input-table" cellspacing="0">
<tbody>
<tr>
<td>
<label>${nls.apiKey}</label>
</td>
<td>
<input
@DGuidi
DGuidi / index.html
Last active December 28, 2015 00:49 — forked from wboykinm/index.html
D3 GeoJSON in Leaflet
<!DOCTYPE html>
<meta charset="utf-8">
<title>D3 GeoJSON in Leaflet</title>
<link href='http://cdn.leafletjs.com/leaflet-0.6.4/leaflet.css' rel='stylesheet' />
<!--[if lte IE 8]>
<link href='http://cdn.leafletjs.com/leaflet-0.6.4/leaflet.ie.css' rel='stylesheet'>
<![endif]--><style>
html, body, #map { height: 100%;width:100%; background:#020B26;position:absolute;}
body { padding: 0; margin: 0; }
path { stroke-linejoin; round; stroke-linecap: round; fill: none}
@DGuidi
DGuidi / gist:5453188
Last active December 16, 2015 15:08
super-simple JS class creation
// from: http://davidwalsh.name/javascript-objects-deconstruction
var Foo = {
init: function(who) {
this.me = who;
},
identify: function() {
return "I am " + this.me;
}
};
@DGuidi
DGuidi / leaflet.google.js
Created March 7, 2012 12:27
leaflet+google integration
/*
* Here the 'inspiration': http://goo.gl/OKL9A
* Adapted from: http://psha.org.ru/leaflet/Google.js
* Demo: http://psha.org.ru/leaflet/bel.html
* This code works well with jquerymobile:
* the original code maintain a div.height of 0 for the internal google container
* REMARKS: this
* NOTE: jQuery required!
*/
@DGuidi
DGuidi / TileLayer.TileJSON.js
Created February 1, 2012 08:49
Leaflet TileCanvas
L.TileLayer.TileJSON = L.TileLayer.Canvas.extend({
options: {
debug: false
},
tileSize: 256,
initialize: function (options) {
L.Util.setOptions(this, options);