<commit_before>Nanomaps
========
Nanomaps is a small JavaScript library for displaying no-frills slippy maps
on click and touch devices.

Release 0.2.0
-------------
Links:

* Demo (prod): http://www.rcode.net/nanomaps/nanomaps-js-0.2.0/prod/
* Demo (debug): http://www.rcode.net/nanomaps/nanomaps-js-0.2.0/debug/
* Api Docs: http://www.rcode.net/nanomaps/nanomaps-js-0.2.0/apidocs/
* Download: http://www.rcode.net/nanomaps/nanomaps-js-0.2.0.tar.gz

Combined javascript file is in either the prod (compressed) or debug (uncompressed)
directory under lib/nanomaps.bundle.all.js

See below for release notes.

Niche
-----
This project really doesn't compete with OpenLayers, Google Maps v3 or any of the
other "full" map apis.  Each of these apis offers a full "web cartographic display"
solution (for lack of a better word) and insulates the developer heavily from the
knowledge that they are in fact on a web page, doing htmly things for the rest
of the site.

Nanomaps aims to be different in that it provides a thin veneer over the DOM,
just enough to handle geographic positioning and event handling.  It presumes
that you will be bringing your own tools for manipulating the content that
you put on and around the map and is really just there to manage the map surface.

This project will provide a number of add-on libraries (which are intended to more
be examples than library code) illustrating higher level concepts like markers,
shapes, info windows, etc.

In exchange for this minimalism, you get to add maps to your pages for just a
handful of kilobytes of JavaScript.

Quick Start
-----------
Once you have a map, the "attach" method can be used to add either raw HTML
elements or "factory object" (of which a TileLayer is one) directly to the map.
In order to position properly, elements must have "latitude" and "longitude"
attributes.  The element will be maintained on the map with its upper left corner
at the given coordinates.  Use standard CSS techniques to reposition (ie. margin
or padding) to match the tail of the icon.

When a map is constructed, any positioned elements (having a latitude and longitude attribute)
are positioned onto the map (due to a bug, they also need a z-index for the moment).
Non-positioned elements remain in the container and map content is added before them
in the DOM.
	
	<style>
		#map {
			width: 640px;
			height: 480px;
		}
		
		#mapcopy {
			z-index: 50;
			position: absolute;
			right: 2px; bottom: 2px;
			text-align: right;
			font-family: sans-serif;
			font-size: 10px;
			-webkit-user-select:none;
			-moz-user-select:none;
			cursor: default;
		}
		#mapcopy a:visited {
			color: #00f;
		}
		
		.poi {
			z-index: 100;
			margin-left: -10px;
			margin-top: -32px;
			display: none;	/* make not displayed by default to avoid startup flicker */
		}
	</style>

	<div id="mymap">
		<img class="poi" src="images/red-pushpin.png" latitude="39.780533" longitude="-104.988896" />
		
		<span>Tiles Courtesy of <a href="http://open.mapquest.co.uk/" target="_blank">MapQuest</a> <img width="16" height="16" src="http://developer.mapquest.com/content/osm/mq_logo.png" border="0"></span>
		<br />
		<span>&copy; <a href="http://www.openstreetmap.org/">OpenStreetMap</a> and contributors, <a href="http://creativecommons.org/licenses/by-sa/2.0/">CC-BY-SA</a></span>
	</div>
	
	<script>
		var map=new nanomaps.MapSurface(document.getElementById("mymap"));
		map.attach(new nanomaps.TileLayer({ 
		   tileSrc: "http://otile${modulo:1,2,3}.mqcdn.com/tiles/1.0.0/osm/${level}/${tileX}/${tileY}.png" }));
	</script>	

Change Log
==========

Release 0.2.0
-------------
This is a snapshot of recent refactorings and has received minimal testing.  Key updates:

* Backported API structure and many concepts from nanomaps-droid (https://github.com/stellaeof/nanomaps-droid)<commit_msg>Release 0.2.0<commit_after>Nanomaps
========
Nanomaps is a small JavaScript library for displaying no-frills slippy maps
on click and touch devices.

Release 0.2.0
-------------
Links:

* Demo (prod): http://www.rcode.net/nanomaps/nanomaps-js-0.2.0/prod/
* Demo (debug): http://www.rcode.net/nanomaps/nanomaps-js-0.2.0/debug/
* Api Docs: http://www.rcode.net/nanomaps/nanomaps-js-0.2.0/apidocs/
* Download: http://www.rcode.net/nanomaps/nanomaps-js-0.2.0.tar.gz

Combined javascript file is in either the prod (compressed) or debug (uncompressed)
directory under lib/nanomaps.bundle.all.js

See below for release notes.

Niche
-----
This project really doesn't compete with OpenLayers, Google Maps v3 or any of the
other "full" map apis.  Each of these apis offers a full "web cartographic display"
solution (for lack of a better word) and insulates the developer heavily from the
knowledge that they are in fact on a web page, doing htmly things for the rest
of the site.

Nanomaps aims to be different in that it provides a thin veneer over the DOM,
just enough to handle geographic positioning and event handling.  It presumes
that you will be bringing your own tools for manipulating the content that
you put on and around the map and is really just there to manage the map surface.

This project will provide a number of add-on libraries (which are intended to more
be examples than library code) illustrating higher level concepts like markers,
shapes, info windows, etc.

In exchange for this minimalism, you get to add maps to your pages for just a
handful of kilobytes of JavaScript.

Quick Start
-----------
Once you have a map, the "attach" method can be used to add either raw HTML
elements or "factory object" (of which a TileLayer is one) directly to the map.
In order to position properly, elements must have "latitude" and "longitude"
attributes.  The element will be maintained on the map with its upper left corner
at the given coordinates.  Use standard CSS techniques to reposition (ie. margin
or padding) to match the tail of the icon.

When a map is constructed, any positioned elements (having a latitude and longitude attribute)
are positioned onto the map (due to a bug, they also need a z-index for the moment).
Non-positioned elements remain in the container and map content is added before them
in the DOM.
	
	<style>
		#map {
			width: 640px;
			height: 480px;
		}
		
		#mapcopy {
			z-index: 50;
			position: absolute;
			right: 2px; bottom: 2px;
			text-align: right;
			font-family: sans-serif;
			font-size: 10px;
			-webkit-user-select:none;
			-moz-user-select:none;
			cursor: default;
		}
		#mapcopy a:visited {
			color: #00f;
		}
		
		.poi {
			z-index: 100;
			margin-left: -10px;
			margin-top: -32px;
			display: none;	/* make not displayed by default to avoid startup flicker */
		}
	</style>

	<div id="mymap">
		<img class="poi" src="images/red-pushpin.png" latitude="39.780533" longitude="-104.988896" />
		
		<span>Tiles Courtesy of <a href="http://open.mapquest.co.uk/" target="_blank">MapQuest</a> <img width="16" height="16" src="http://developer.mapquest.com/content/osm/mq_logo.png" border="0"></span>
		<br />
		<span>&copy; <a href="http://www.openstreetmap.org/">OpenStreetMap</a> and contributors, <a href="http://creativecommons.org/licenses/by-sa/2.0/">CC-BY-SA</a></span>
	</div>
	
	<script>
		var map=new nanomaps.MapSurface(document.getElementById("mymap"));
		map.attach(new nanomaps.TileLayer({ 
		   tileSrc: "http://otile${modulo:1,2,3}.mqcdn.com/tiles/1.0.0/osm/${level}/${tileX}/${tileY}.png" }));
	</script>	

Roadmap
=======
My company is targeting release of two products in the next 60 days which will have components that make use of both
nanomaps (JavaScript) and nanomaps-droid.  Expect relative completion of each along that same timeline.
	
Change Log
==========

Release 0.2.0
-------------
This is a snapshot of recent refactorings and has received minimal testing.  Key updates:

* Backported API structure and many concepts from nanomaps-droid (https://github.com/stellaeof/nanomaps-droid)
{'fraction_non_alphanumeric': 0.11748322572477529, 'fraction_numerical': 0.01835675401949614, 'mean_word_length': 3.761904761904762, 'pattern_counts': {'":': 0, '<': 41, '<?xml version=': 0, '>': 41, 'https://': 2, 'lorem ipsum': 0, 'www.': 10, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 2, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '178120', 'n_tokens_mistral': 2728, 'n_tokens_neox': 2467, 'n_words': 946}