Skip to content

Instantly share code, notes, and snippets.

View hhkaos's full-sized avatar
🏠
Working from home

Raul Jimenez Ortega hhkaos

🏠
Working from home
View GitHub Profile
<html>
<head>
<style>#mapDiv,body,html{width:100%; height:400px;margin:0;padding:0}</style>
</head>
<body>
<h1>Search places in ArcGIS</h1>
<div id="mapDiv"></div>
<script type="module">
import MapView from "https://js.arcgis.com/4.18/@arcgis/core/views/MapView.js";
import Locator from "https://js.arcgis.com/4.18/@arcgis/core/tasks/Locator.js";
<html>
<head>
<style>#mapDiv,body,html{width:100%; height:400px;margin:0;padding:0}</style>
</head>
<body>
<h1>Search places in Google Maps</h1>
<div id="mapDiv"></div>
<script>
function initMap() {
<html>
<head>
<style>#mapDiv{width:100%; height:400px}</style>
</head>
<body>
<h1>Drawing marker in Google Maps</h1>
<div id="mapDiv"></div>
<script>
function initMap() {
const map = new google.maps.Map(document.getElementById('mapDiv'), {
<html>
<head>
<style>#mapDiv{width:100%; height:400px}</style>
</head>
<body>
<h1>Drawing marker in ArcGIS</h1>
<div id="mapDiv"></div>
<script type="module">
import MapView from "https://js.arcgis.com/4.18/@arcgis/core/views/MapView.js";
@hhkaos
hhkaos / svg-with-leaflet.html
Created January 26, 2021 09:47
Simple svg map
<html>
<head>
<style>
#map {
height: 400px;
}
</style>
<link rel="stylesheet" href="https://unpkg.com/[email protected]/dist/leaflet.css" />
<script src="https://unpkg.com/[email protected]/dist/leaflet.js"></script>
</head>
@hhkaos
hhkaos / embed-widget-sample.html
Created January 7, 2021 11:56
Embeber geoiniciativas
<html>
<head>
</head>
<body>
<script>
const s = document.createElement("script");
s.type = "text/javascript";
s.src = "https://geo-developers.github.io/geoiniciativas/assets/js/geoiniciativas-widget.js";
@hhkaos
hhkaos / index.js
Last active November 24, 2020 15:27
Script en node para descargar datos de escolarización de la Junta de Andalucía
var https = require('follow-redirects').https;
var fs = require('fs');
let data = {
idProvincia: '04',
idMunicipio: '04013',
idTipoVia: '',
tipoVia: 'AVENIDA',
codIberVia: 'AVENIDA,FEDERICO GARCIA LORCA',
nombreVia: 'FEDERICO GARCIA LORCA',
@hhkaos
hhkaos / gist:5b599581483bc89bbf4cd76fe2cba8fc
Created June 15, 2020 09:28
devcommunitymanager.html
<!doctype html>
<html class="no-js" lang="es-es">
<head>
<meta charset="utf-8">
<title>Download CSV</title>
<meta name="description" content="">
<meta name="viewport" content="width=device-width, initial-scale=1">
<link rel="manifest" href="site.webmanifest">
<link rel="apple-touch-icon" href="icon.png">
<link rel="stylesheet" href="css/normalize.css">
@hhkaos
hhkaos / script.js
Last active December 21, 2019 06:05
Script used in Google Forms to Geocode an address on Submit using ArcGIS Geocoder. Live demo: http://bit.ly/EOEcosystem
function getData(url){
Utilities.sleep(1000);
var response = UrlFetchApp.fetch(url);
var json = response.getContentText();
return JSON.parse(json);
}
function getToken(client_id, client_secret){
Utilities.sleep(1000);