Author’s Note: HTML5 Streetmaps

“A good programmer looks for ways to create ‘layers of abstraction’ that hide the complexity of the lower layers of a given software language or library…a better programmer eliminates the need for programming altogether.”

– Data Ninja 10/1/2016

I wrote HTML5 to give web designers who know HTML/CSS (but not not jquery and javascript) an easy way to create sophisticated leaflet/mapbox streetmaps for their web pages, without writing a single line of javascript code.

The technique used in this script is to leverage jquery’s class selector functionality – e.g. $(‘.myclass’)… – to create custom tags. By eliminating the dot ‘.’ in the class selector search string, jquery grabs any tag with a tag name that matches what is specified in a ‘dot-less’ class selector entry.

For instance, to create the custom tag, this script starts by using the following code – ‘$(“streetmap”)… that finds every instance of the streetmap tag on a web page, reads its attributes – ‘data-…’ – and renders the streetmap accordingly.

Now, with a single javascript declaration at the top of any webpage, streetmaps leveraging leaflet/mapbox advanced features – including markers, heatmaps, markerclusters, polygons and other shapes – can be rendered with straight HTML.

Eliminating the need for programming altogether!

I hope non-programmers and programmers alike find this script useful. Drop me a note if you have any questions.

HTML5 Streetmaps – available NOW at codecanyon.net! Click here!

Tanoshinde (‘Have fun!’),
Data Ninja
my email: dataninja.at.codecanyon@gmail.com
my codecanyon portfolio: click here
Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s