Skip to content

Instantly share code, notes, and snippets.

@AlanPew
AlanPew / index.html
Created July 4, 2022 18:05
maplibre ESRI OSM
<!--
To run this demo, you need to replace 'YOUR_API_KEY' with an API key from the ArcGIS Developers dashboard.
Sign up for a free account and get an API key.
https://developers.arcgis.com/documentation/mapping-apis-and-services/get-started/
-->
@AlanPew
AlanPew / index.html
Last active June 3, 2022 23:05
infra test
<!doctype html>
<html>
<head>
<meta charset="UTF-8">
<title>Open Infrastructure Map</title>
<meta name="twitter:card" content="summary">
<meta name="twitter:site" content="@openinframap">
<meta name="twitter:creator" content="@russss">
<meta name="viewport" content="width=device-width,initial-scale=1">
<meta name="description" content="Map of the world's electricity, telecoms, oil, and gas infrastructure, using data from OpenStreetMap">
@AlanPew
AlanPew / export.py
Created October 22, 2021 00:11 — forked from rosskarchner/export.py
extract tiles from an mbtiles file
import sqlite3, os
conn = sqlite3.connect('Mills1860.mbtiles')
results=conn.execute('select * from tiles').fetchall()
for result in results:
zoom, column, row, png= result
try:
os.makedirs('%s/%s/' % (zoom, row))
@AlanPew
AlanPew / index.html
Created September 6, 2021 04:29
test agol
<!--
To run this demo, you need to replace 'YOUR_API_KEY' with an API key from the ArcGIS Developer dashboard.
Sign up for a free account and get an API key.
https://developers.arcgis.com/documentation/mapping-apis-and-services/get-started/
--><html>
<head>
@AlanPew
AlanPew / index.html
Created September 5, 2021 16:29
esri nat geo webmap
<html>
<head>
<meta charset="utf-8" />
<meta
name="viewport"
content="initial-scale=1,maximum-scale=1,user-scalable=no"
/>
<title>Load a basic WebMap | Sample | ArcGIS API for JavaScript 4.20</title>
<style>
@AlanPew
AlanPew / index.html
Last active September 5, 2021 16:14
esri js test 2
<html>
<head>
<meta charset="utf-8">
<meta name="viewport" content="initial-scale=1, maximum-scale=1, user-scalable=no">
<title>ArcGIS Developer Guide: Display a map (2D)</title>
<style>
html,
body,
#viewDiv {
@AlanPew
AlanPew / index.html
Created September 5, 2021 15:53
esri js test
<html>
<head>
<meta charset="utf-8">
<meta name="viewport" content="initial-scale=1, maximum-scale=1, user-scalable=no">
<title>ArcGIS Developer Guide: Display a map (2D)</title>
<style>
html,
body,
#viewDiv {
@AlanPew
AlanPew / index.html
Created September 5, 2021 15:52
e s r i test
<html>
<head>
<meta charset="utf-8">
<meta name="viewport" content="initial-scale=1, maximum-scale=1, user-scalable=no">
<title>ArcGIS API for JavaScript Tutorials: Add a styled basemap layer</title>
<style>
html, body, #viewDiv {
padding: 0;
margin: 0;
height: 100%;
@AlanPew
AlanPew / index.html
Created September 18, 2020 15:17
apple4
<head>
<script src="https://cdn.apple-mapkit.com/mk/5.x.x/mapkit.js"></script>
<style>
#map {
width: 100%;
height: 600px;
}
@AlanPew
AlanPew / index.html
Created September 18, 2020 15:14
apple3
<head>
<script src="https://cdn.apple-mapkit.com/mk/5.x.x/mapkit.js"></script>
<style>
#map {
width: 100%;
height: 600px;
}