Welcome To Snipplr


Everyone's Recent JavaScript Snippets Tagged google



This code was re-purposed from Pamela Fox's MapIconMaker v1.1 to work with Google Maps API v3.
1 884 posted 14 years ago by sandrews_06
Be sure to call the exact version desired or the script is only cached for one hour! http://encosia.com/2009/10/11/do-you-know-about-this-undocumented-google-cdn-feature/
1 919 posted 14 years ago by housecor
A recent update to either Google's search results page or Firefox's Tab Mix Plus add-on has prevented a locked tab from opening links in a new tab. This Greasemonkey script removes the tracking code on the Google links that causes the problem. I don'...
0 905 posted 14 years ago by wizard04
This example shows how enableEditing can be emulated in version 3 of the Google Maps API. \\r\\nWhen releasing an editable point after dragging it, the changed part of the polyline will be updated.\\r\\nPoints can be added to by clicking on the map a...
0 2355 posted 14 years ago by peckham
Just the copy of the official code
0 596 posted 14 years ago by koko
0 795 posted 14 years ago by marzsman
Paste this in address bar a viola!
0 774 posted 14 years ago by landonmiller
1 597 posted 14 years ago by tscheckenbach
0 539 posted 14 years ago by tscheckenbach
Just a blank example where you replace the xxxxx figure with your tracking code
1 697 posted 14 years ago by wanderlusts
Borrowed from Jerome Paradis: http://blog.jeromeparadis.com
0 1085 posted 14 years ago by Jamie
Avoid *.js upload confusions. Use http://code.google.com/apis/ajaxlibs/
0 783 posted 14 years ago by ialexs
0 636 posted 14 years ago by anebg
async loading
0 652 posted 14 years ago by peterbelsky
This function calculates distance with the Haversine formula, this formula assumes that our Earth is spherical, but it isn’t since it’s more like a big orange fruit also compresses at poles. I’ve read that this function has an error about + o â...
3 5966 posted 15 years ago by ginoplusio
When you show the coordinates of a point, it’s sometimes better to show them as degrees and not as deciaml (even if decimal is simpler). Each of the two coordinates can be converted with the same function. In the function call the “tipo” is the...
1 961 posted 15 years ago by ginoplusio
I’ve made a ruler to measure distances on a Google Map V3. The file Ruler.js contains a two function: one to calculate the distance between two points on the map with their position expressed in decimal degrees, and one function that add the ruler....
1 1350 posted 15 years ago by ginoplusio
0 682 posted 15 years ago by bionickid
In order to track links out Google requires you add this snippet of JavaScript to your anchor(a) tag. Replace /G1/example.com with whatever you want to use to identify the link.
1 873 posted 15 years ago by smoothdzion
XHTML 1.0 Strict deprecates the use of iframes in favor of objects. While this has gotten a lot of flack, iframes were never truly a part of HTML, just a proprietary element in Internet Explorer that eventually got universal support. Objects are a mo...
0 998 posted 15 years ago by chrisdpratt
Make sure you change the variable v_ga_track near the end of the script.
0 757 posted 15 years ago by chrisjlee
Simple jQuery snippet for cleanly and automatically setting up your google analytics
4 920 posted 15 years ago by garside
3 821 posted 16 years ago by jamesming
This is a sample Google Maps API script that shows a base map with city markers, each with a numbered label. The marker is a default, blank red marker with a number label defined by the overlay array. Clicking on a marker takes you to a page define...
1 1257 posted 16 years ago by bcalloway
Sample script to use Google API to display a map with multiple marker layers that can be toggled on/off using checkboxes. The map data is provided using the .kml files provided from "My Maps" on Google, or Google Earth files.
2 1804 posted 16 years ago by bcalloway
Set the center of the map on the person's location based on IP address. In this case the user is required to be in the USA.
0 1303 posted 16 years ago by sgraber