JackDougherty / bikemapcode

mobile-friendly bicycle map tool with open-source code, designed for cycling groups to customize and host on their own sites

Home Page:https://jackdougherty.github.io/bikemapcode

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

bikemapcode

Mobile-friendly web maps created with open-source Leaflet templates.

  • Show multiple color-coded routes (uploaded as GPX or GeoJSON files)
  • Two templates:
    • Dropdown menu of bike tours, with geotagged Flickr photos (index.html)
    • Checkbox menu of bike routes, with find-your-location on smartphones or desktop (westhartford.html)
  • Host your map on a free GitHub Pages site or your own website (see http://DataVizForAll.org)

What the tool does NOT do:

  • It does not provide routing directions to bike from point A to B
  • It does not work without internet access.

Distributed as-is with no warranty under an MIT license. Feedback and code contributions welcome on GitHub or email to jack.dougherty@trincoll.edu

Demos

Dropdrown menu of bike tours

https://jackdougherty.github.io/bikemapcode/index.html

Map embedded as an iframe on another site

http://jackbikes.org/2015/08/join-new-britain-ride/

Map code in a root-level folder of a self-hosted WordPress site

https://bikewesthartford.org/map

Checkbox menu of bike routes (with shortened links)

Code credits and open-source licenses

To Do

  • condense bike tour routes into GPX files
  • vary colors
  • add start marker, with link to WordPress page
  • ask Ilya about way to include Dropdown menu name in URL, similar to leaflet-hash
  • ask Ilya about automatically detecting bounds to limit Flickr photos via bbox, similar to fitBounds
  • see https://www.flickr.com/services/api/flickr.photos.search.htm
  • remove all Mapzen refs
  • add back compass?
	map.addControl( new L.Control.Compass({position: "topleft"}) );

Reminders

var HartGISBike = L.esri.featureLayer({
	url: 'http://gis1.hartford.gov/arcgis/rest/services/OpenData_Community/MapServer/9',
	style: function () {
		return { color: "#70ca49", opacity: 0.7, weight: 5};
	}
});
controlLayers.addOverlay(HartGISBike, 'City of Hartford bike lanes');

//esri-leaflet popup
TrinGISPrimaryRoutes.bindPopup(function (feature) {
   	return L.Util.template('<p>Primary Route<br>FID: {FID}</p>', feature.properties);
});

About

mobile-friendly bicycle map tool with open-source code, designed for cycling groups to customize and host on their own sites

https://jackdougherty.github.io/bikemapcode

License:MIT License


Languages

Language:HTML 75.2%Language:JavaScript 23.4%Language:CSS 1.4%