• Stars
    star
    255
  • Rank 159,729 (Top 4 %)
  • Language
    JavaScript
  • License
    MIT License
  • Created about 12 years ago
  • Updated about 2 years ago

Reviews

There are no reviews yet. Be the first to send feedback to the community and the maintainers!

Repository Details

jHERE - Maps made easy

#jHERE

Maps are cool, but map APIs are complicated. jHERE solves this problem by offering a simple but powerful map API in the form of a jQuery (or Zepto.JS) plugin.

With jHERE, you can easily add interactive maps to your website. In only 4KB, you get a powerful map API, highly customizable markers, event handling and info bubbles. Bonus features are KML support and data visualization via heatmaps.

Screenshot

Add jHERE to your pages

Adding jHERE to a web page or web application is very easy. jHERE supports both jQuery as well as Zepto.JS, so first of all include one of these libraries.

<script type="text/javascript" src="//cdnjs.cloudflare.com/ajax/libs/jquery/1.8.2/jquery.min.js"></script>

or

<script type="text/javascript" src="//cdnjs.cloudflare.com/ajax/libs/zepto/1.0rc1/zepto.min.js"></script>

In case you are using Zepto, you will need to include the Zepto adapter, that includes a couple of little things that are not implemented in Zepto and I used in my plugin ($.Deferred and $.data).

<script type="text/javascript" src="js/zepto.adapter.js">
<!--Only when using Zepto-->
</script>

In case you are using Tire, then include the Tire adapter (adds $.Deferred, $.data, $.proxy, $.inArray and $.Event to Tire):

<script type="text/javascript" src="js/tire.adapter.js">
<!--Only when using Tire-->
</script>

Finally include the plugin.

<script type="text/javascript" src="js/jhere.js"></script>

And done. Execute your code on window load.

<script>
	$(window).on('load', function(){
		$('#map').jHERE({
			enable: ['behavior'],
    		center: [40.664167, -73.838611],
	        zoom: 8
		})
	});
</script>

That's it. All the documentation is available at jhere.net/docs.html.

Extensions

Please refer to EXTENSIONS.md for information about the extensions for jHERE.

Playground

Because @thingsinjars is awesome jHERE has a playground, where you can go and experiment with the API, make cool maps, save the result as a Gist and share it with the world.

Contribute

Feel free to submit pull requests and report the issues you may find when using the plugin.

Code Style

I am not a code style super-geek, but here are the things I like and I don't like:

  1. ☼ Like: semicolons at the end of the line.
  2. Don't like: tabs, use 4 spaces instead. Not 1, not 2, 4.
  3. ☼ Like: single quotes for strings.
  4. Don't like: trailing whitespaces, messed up indentation.
  5. ☼ Like: meaningful variable names. Don't steal the job to the minificator. Also I want to keep the size of the plugin small, so do facilitate the minificator's job by caching long namespaces and functions that are invoked often.
  6. Don't like: globals.
  7. ☼ Like: well documented API. If you add functionalities, take the time to write the documentation using // comments directly in the source code. Docco will do the rest.

Comments

I normally like single line comments, i.e.

//My comment goes here

However I am using Docco to automatically generate documentation for the API, so // is reserved for documentation, as single line comments are parsed by the tool. Anything that developers using the plugin should not see in the API docs will have to be commented with /* */.

Before submitting a pull request

If you changed anything in jhere.js before pushing please run a

make test

If something fails, please fix the problem.

If you changed anything else (e.g. extensions, adapters) please run

make dist

before submitting the pull request.

Supporters

jHERE is kindly supported by:

BrowserStack logo

BrowserStack: Live, Web-Based Browser Testing on all desktop and mobile browsers. I use BrowserStack to make sure jHERE runs on all the supported browsers.

Digital Ocean logo

Digital Ocean: Simple Cloud Hosting, Built for Developers. Soon jhere.net and the playground will be hosted on Digital Ocean.

More Repositories

1

Jenkins-X

A OSX client for Jenkins
JavaScript
24
star
2

node-smc

Node module to read the CPU temperature and fan speed on osx using smc
C++
21
star
3

rmi.js

Remote Method Invocation (RMI) for JavaScript
JavaScript
19
star
4

ubuntu-node-nginx-ansible

A basic skeleton for an multi-app/multi-service environment based on node.js.
JavaScript
18
star
5

android-flaggr

Runtime-togglable feature flags for Android applications
Java
17
star
6

jquery-on-demand

jQuery plugin to load features on demand
JavaScript
12
star
7

ar-indor-mapping

Indoor mapping with AR Drone and Node.js. Built at the awesome Nodecopter hackathon.
JavaScript
12
star
8

Bootstrapper

Handy Node.js command line application to manage templates and boilerplates.
JavaScript
11
star
9

grunt-alert

Sends alerts about failing builds using different channels
JavaScript
8
star
10

jOVI

A jQuery plugin on top of the Nokia Maps API **no longer maintained: please look at jHERE instead:** http://github.com/mmarcon/jhere
JavaScript
5
star
11

zoomino

Mute/Unmute Zoom with Arduino
JavaScript
4
star
12

htm5Hackathon

htm5Hackathon git repo
JavaScript
4
star
13

node-keyring

Never push your passwords and API keys to version control again.
JavaScript
4
star
14

liquibase-mongo-docker

Liquibase and its MongoDB extension inside a Docker image.
Dockerfile
4
star
15

pretty-data

Intuitive way of creating d3 visualization headlessly.
JavaScript
3
star
16

websocket-dev-derby

Repo for Mozilla Dev Derby May 2012
JavaScript
3
star
17

HERE-JavaScript-API-Boilerplate

A simple boilerplate to create an application based on the HERE API
2
star
18

findtile

Simple map-based game.
JavaScript
2
star
19

sublime-livecode

A Sublime Text2 Plugin to live stream code to a web page.
Python
2
star
20

neighborhood-hangout

Where do your neighbors hangout?
JavaScript
1
star
21

ws-perf

Little web application to run simple performance tests with websockets.
JavaScript
1
star
22

mdbw19-compass-for-developers

Repo for Compass for Developers session at MDBW19
JavaScript
1
star
23

wordle-solver

JavaScript
1
star
24

temperature-humidity-pi

Python
1
star
25

GalleryInspector

A PHP class to extract meaningful information from Gallery 3 MySQL database.
PHP
1
star
26

basicHTML5boilerplate

Basic HTML5 Boilerplate & Bootstrapper template.
JavaScript
1
star
27

mongo-favs

MongoDB shell launcher with support for Compass favorites
JavaScript
1
star
28

chainforge-docker

Chainforge inside Docker
Python
1
star
29

mddy

Write your notes in Markdown, Mddy does the rest.
CSS
1
star
30

vocal-search

Simple application that performs searches for places around you. Queries are issue with voice, via the Web Speech API (search for restaurants, look for barbershop, etc.).
JavaScript
1
star
31

slides

Slide decks from my presentations.
JavaScript
1
star