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 643 posted 13 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 686 posted 13 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 680 posted 13 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 1987 posted 13 years ago by peckham
Just the copy of the official code
0 434 posted 13 years ago by koko
0 586 posted 13 years ago by marzsman
Paste this in address bar a viola!
0 563 posted 13 years ago by landonmiller
1 426 posted 14 years ago by tscheckenbach
0 384 posted 14 years ago by tscheckenbach
Just a blank example where you replace the xxxxx figure with your tracking code
1 500 posted 14 years ago by wanderlusts
Borrowed from Jerome Paradis: http://blog.jeromeparadis.com
0 837 posted 14 years ago by Jamie
Avoid *.js upload confusions. Use http://code.google.com/apis/ajaxlibs/
0 588 posted 14 years ago by ialexs
0 472 posted 14 years ago by anebg
async loading
0 484 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 5468 posted 14 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 701 posted 14 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 1125 posted 14 years ago by ginoplusio
0 490 posted 14 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 649 posted 14 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 720 posted 14 years ago by chrisdpratt
Make sure you change the variable v_ga_track near the end of the script.
0 543 posted 14 years ago by chrisjlee
Simple jQuery snippet for cleanly and automatically setting up your google analytics
4 700 posted 15 years ago by garside
3 617 posted 15 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 896 posted 15 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 1569 posted 15 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 1028 posted 15 years ago by sgraber