Skip to content

Instantly share code, notes, and snippets.

@TravelTime-Frontend
Created February 21, 2023 13:16
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save TravelTime-Frontend/b3747c434a8253ed1ac883612840bc7e to your computer and use it in GitHub Desktop.
Save TravelTime-Frontend/b3747c434a8253ed1ac883612840bc7e to your computer and use it in GitHub Desktop.
//Map set up
// The url template for OpenStreetMap tiles.
var osmUrl = "http://{s}.tile.openstreetmap.org/{z}/{x}/{y}.png";
// Creates the tile layer
var osmTileLayer = L.tileLayer(osmUrl, { minZoom: 8, maxZoom: 15 });
// Adds the tile layer to the map.
var map = L.map("map").addLayer(osmTileLayer);
// Creates a marker for our departure location and adds it to the map.
L.marker(markerCoords).addTo(map);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment