Skip to content

Instantly share code, notes, and snippets.

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

Luis Mendoza Lmendev

🏠
Working from home
View GitHub Profile
@Lmendev
Lmendev / Blogger Template from scratch.xml
Last active January 31, 2021 13:55
A blank Blogger Template page to start developing from scratch
<?xml version="1.0" encoding="UTF-8" ?>
<!DOCTYPE html>
<html b:css='false' b:js='false' b:defaultwidgetversion='2' b:layoutsVersion='3' b:responsive='true' b:templateVersion='1.0.0' expr:dir='data:blog.languageDirection' xmlns='http://www.w3.org/1999/xhtml' xmlns:b='http://www.google.com/2005/gml/b' xmlns:data='http://www.google.com/2005/gml/data' xmlns:expr='http://www.google.com/2005/gml/expr'>
<head>
<meta charset='utf-8'/>
<meta name='viewport' content='width=device-width, initial-scale=1.0'>
<meta name="description" content="XXXXX">
<meta name="author" content="XXXXX">
<title><data:view.title.escaped/></title>
@Lmendev
Lmendev / ballon_tabs.kml
Last active February 28, 2023 18:54
Simple Google Earth KML Balloons with Tabbed Navigation using HTML and JavaScript
<?xml version="1.0" encoding="UTF-8"?>
<kml xmlns="http://earth.google.com/kml/2.2">
<Document>
<name>Simple balloon tabs example</name>
<Folder>
<name>Folder</name>
<visibility>1</visibility>
<Placemark>
<name>Balloon tabs example</name>
<description>
@Lmendev
Lmendev / drawSector.js
Last active March 29, 2023 09:12
Create a semicircle with Google Maps API v3. Coordinated and azimuth data are required. This is an adaptation of https://groups.google.com/forum/#!topic/google-maps-api/rKefiTZPXE8
const drawSector = ({ lat, lng, r, azimuth, width, map }) => {
const centerPoint = new google.maps.LatLng(lat, lng);
const PRlat = (r / 3963) * (180 / Math.PI); // using 3963 miles as earth's radius
const PRlng = PRlat / Math.cos(lat * (Math.PI / 180));
let theta = 0;
let gamma = (Math.PI / 180) * (azimuth + width / 2);
let PGpoints = [];
for (let a = 0; theta < gamma; a++) {