JSFiddle - React, Tailwind, and code Playground
by sachinsharma9780
JavaScript
<html>
<head>
<meta charset="utf-8" />
<title>A simple map</title>
<meta name="viewport" content="initial-scale=1,maximum-scale=1,user-scalable=no" />
<link rel="stylesheet" href="https://unpkg.com/[email protected]/dist/leaflet.css" />
<style>
body {
margin: 0;
padding: 0;
}
#map {
position: absolute;
top: 0;
bottom: 0;
width: 100%;
}
</style>
</head>
<body>
<div id="map"></div>
<script src="https://ajax.googleapis.com/ajax/libs/jquery/3.1.1/jquery.min.js"></script>
<script src="https://unpkg.com/[email protected]/dist/leaflet.js"></script>
<script>
var berlin = $.ajax({
url: "https://raw.githubusercontent.com/sachinsharma9780/ci_project/master/Berlin.geojson",
dataType: "json",
success: console.log("Berlin data successfully loaded."),
error: function(xhr) {
alert('Berlin: ${xhr.statusText}');
}
});
var trencin = $.ajax({
url: "https://raw.githubusercontent.com/sachinsharma9780/ci_project/master/Boundary2012_SK008L1_TRENCIN_clean.geojson",
dataType: "json",
success: console.log("Trencin data successfully loaded."),
error: function(xhr) {
alert('Trencin: ${xhr.statusText}');
}
});
var hamburg = $.ajax({
url: "https://raw.githubusercontent.com/sachinsharma9780/ci_project/master/GeoJson_Files/Boundary2012_DE002L1_HAMBURG_clean.geojson",
dataType: "json",
success: console.log("Hamburg data successfully loaded."),
error: function(xhr) {
alert('Hamburg: ${xhr.statusText}');
}
});
var cologne = $.ajax({
url: "https://raw.githubusercontent.com/sachinsharma9780/ci_project/master/GeoJson_Files/Boundary2012_DE004L1_KOLN_clean.geojson",
dataType: "json",
success: console.log("Cologne...