Simple, self-containted Leaflet.js example, takend from Leaflet's Quick Start Guide.
Simple, self-containted Google Maps JavaScript API v3 example, takend from Code Samples.
Google Maps JavaScript API v3 and D3js cloned and extended from mbostock.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<!DOCTYPE html> | |
<html> | |
<head> | |
<title>Simple Map</title> | |
<meta name="viewport" content="initial-scale=1.0, user-scalable=no"> | |
<meta charset="utf-8"> | |
<style> | |
html, body, #map-canvas { | |
height: 100%; |
Many markers: Google Maps and Leaflet
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?xml version="1.0" encoding="UTF-8"?> | |
<kml xmlns="http://www.opengis.net/kml/2.2" xmlns:gx="http://www.google.com/kml/ext/2.2" xmlns:kml="http://www.opengis.net/kml/2.2" xmlns:atom="http://www.w3.org/2005/Atom"> | |
<GroundOverlay> | |
<name>panel1</name> | |
<Icon> | |
<href>panel1.png</href> | |
<viewBoundScale>0.75</viewBoundScale> | |
</Icon> | |
<LatLonBox> | |
<north>37.5422476694301</north> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<!DOCTYPE html> | |
<html> | |
<head> | |
<meta name="viewport" content="initial-scale=1.0, user-scalable=no"> | |
<meta charset="utf-8"> | |
<title>Simple Polylines</title> | |
<style> | |
html, body, #map-canvas { | |
height: 100%; | |
margin: 0px; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<!DOCTYPE html> | |
<html> | |
<body> | |
<div id="map" style="position: absolute; width: 100%; height: 100%"></div> | |
<script type="text/javascript"> | |
function init(){ | |
var map = new google.maps.Map(document.getElementById('map'), { | |
center: new google.maps.LatLng(37, -95), | |
zoom: 5 | |
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/** | |
* @param {!Array<!TileFactory>} factories | |
* @constructor | |
* @struct | |
* @final | |
* @implements {TileFactory} | |
*/ | |
FallbackTileFactory = function(compositeFacotry, fallbackFactory, fallbackBounds) { | |
/** @override */ | |
this.createTile = function(coord, zoom, size, div, opt_options) { |
If you need a plain JavaScript function to add a smooth scrolling back to the top of the page, you can use this script.
- Add an id of "top" to the
body
- Add the
onclick
function to the link - Include the JavaScript function in your HTML file, preferrably at the bottom before the closing
</body>
tag if possible. Since this script is not part of the UI it can load last and will not negatively affect the user experience or usability of the page.
Author: Marco Del Corno - http://thewebthought.blogspot.com/2012/06/javascript-smooth-scroll-to-top-of-page.html
OlderNewer