### Onclick geodesic polyline

We have seen what is geodesic polyline and its example in the previous post. We have also seen a simple polyline example before. It's now time for an onclick geodesic polyline example and I will discuss it here today. Let's head on to the example straight away...

You can copy the above code in a text file and save it with .html extension. Now click on this html file, which will open it in your browser and you will see your map in action! The output of the code looks as seen in the result section above.

There is one thing that needs explanation in this code. The use of geometry library in the script tag. What is this geometry library and why is it required will be an obvious question. This library is not loaded by default when you load the Maps Javascript API but must be explicitly specified through use of a libraries bootstrap parameter. The Google Maps JavaScript API V3 geometry library provides utility functions for the computation of geometric data on the surface of the Earth. The library includes two namespaces:

1. Spherical contains spherical geometry utilities allowing you to compute angles, distances and areas from latitudes and longitudes.

2. Encoding contains utilities for encoding and decoding polyline paths according to the Encoded Polyline Algorithm.

If you have any queries or doubts, suggestions, constructive criticism regarding this post or the blog in general, please feel free to drop me a mail!

### Geodesic Polyline

Today we will have a look at a very interesting polyline example - "The geodesic polyline". Now the first question that will pop is "What is geodesic?". Mathematically, geodesic means the shortest line between two points on a mathematically defined surface, as a straight line on a plain or an arc of a great circle or sphere.

The next question after reading the above definition is clearly, "Why do we need geodesic polylines?" and that would be followed up with "What is this Great Circle?". We will discuss this first, before we move on to the actual example today. The example is very very similar to the normal polyline example, with just a small change.

Having said so, I will now try to explain why we need a geodesic polyline? The shortest distance between two locations on the earth is rarely a straight line as the earth is roughly spherical in nature. So any two points on the earth, even if they are very close lie on a curve and not …

### Difference between word-break: break-all versus word-wrap: break-word

The 2 CSS properties word-break: break-all and word-wrap: break-word appear to work in the same way or generate the same output, but there is a slight difference between the 2 and we will be discussing these differences today.

Take a look at the example above. The difference is quite evident, however I will try to explain it further.

word-break: break-all Irrespective of whether it’s a continuous word or many words, break-all breaks them up at the edge of the width limit even within the characters of the same word
word-wrap: break-word This will wrap long words onto the next line.break-word adjusts different words so that they do not break in the middle.
So if you have many fixed-size spans which get content dynamically, you might just prefer using word-wrap: break-word, as that way only the continuous words are broken in between, and in case it’s a sentence comprising many words, the spaces are adjusted to get intact words (no break within a word).     In case you want to exp…

### Where does Google get it's live traffic data from?

Referring to a post that I wrote earlier, Google’s - Live traffic Layer, ever wondered how Google collected this data? I was wondering the other day, how Google received live data to display it on their maps as a layer! I looked up the web and found something very interesting and am sharing the same with you all.As we all know, the traffic layer is available most accurately in several states in USA. Most major metro areas in the US have sensors embedded in their highways. These sensors track real time traffic data. Easy to miss at high speeds (hopefully anyway, traffic permitting), more commonly noticed may be the similar sensors that often exist at many busy intersections that help the traffic lights most efficiently let the most amount of people through. The information from these tracking sensors is reported back to the Department of Transportation (DOT). The DOT uses this data to update some of the digital signs that report traffic conditions in many metro areas. They also…

### jQuery Mobile's Next Big Step

Spatial Unlimited changes to The UI Dev

After being hosted on blogger 😣 for the last 6 years 📆, this page has finally been moved to Github.io
This means a few things for you, dear reader!

You will be redirected to the new page shortly! ⏩ ⏩ ⏩

Once crapy HTML is now better looking Markdown! 😍 😍

The entire blog is a Github repo! 😍 😍

Spatial Unlimited is now The UI Dev 😍 😍

### Ground Truth - How Google Builds Maps

Todays's article is cross posted from The Atlantic's Tech section. The article was posted by Alexis Madrigal who is a senior editor at The Atlantic, where he oversees the Technology channel. So, thanks to The Atlantic and Alexis Madrigal, we will have an exclusive look inside Ground Truth, the secretive program to build the world's best accurate maps.

Behind every Google Map, there is a much more complex map that's the key to your queries but hidden from your view. The deep map contains the logic of places: their no-left-turns and freeway on-ramps, speed limits and traffic conditions. This is the data that you're drawing from when you ask Google to navigate you from point A to point B -- and last week, Google showed me the internal map and demonstrated how it was built. It's the first time the company has let anyone watch how the project it calls GT, or "Ground Truth," actually works.
Google opened up at a key moment in its evolution. The co…