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 2036 posted 15 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 2323 posted 16 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 1994 posted 16 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 4034 posted 16 years ago by peckham
Just the copy of the official code
0 1508 posted 16 years ago by koko
0 1728 posted 16 years ago by marzsman
Paste this in address bar a viola!
0 1795 posted 16 years ago by landonmiller
1 1601 posted 16 years ago by tscheckenbach
0 1472 posted 16 years ago by tscheckenbach
Just a blank example where you replace the xxxxx figure with your tracking code
1 1747 posted 16 years ago by wanderlusts
Borrowed from Jerome Paradis: http://blog.jeromeparadis.com
0 2329 posted 16 years ago by Jamie
Avoid *.js upload confusions. Use http://code.google.com/apis/ajaxlibs/
0 1846 posted 16 years ago by ialexs
0 1587 posted 16 years ago by anebg
async loading
0 1659 posted 16 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 8262 posted 16 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 2257 posted 16 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 2636 posted 16 years ago by ginoplusio
0 1716 posted 16 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 2092 posted 16 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 2321 posted 17 years ago by chrisdpratt
Make sure you change the variable v_ga_track near the end of the script.
0 1829 posted 17 years ago by chrisjlee
Simple jQuery snippet for cleanly and automatically setting up your google analytics
4 2265 posted 17 years ago by garside
3 2125 posted 17 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 2609 posted 17 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 3390 posted 17 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 2773 posted 18 years ago by sgraber