<script src="http://maps.google.com/maps/api/js?sensor=false&.js"></script>
<!-- the Google Map will be displayed here -->
<div id="google_map">
</div>
<!-- this section will be used for logging purpose -->
<section id="console">
</section>
/*
* Author: Massimiliano Marcon
* Date: 04/19/2011
*/
var MYAPP = {
map: null, //can be useful to save a reference to the Google Map object
data: { //the definition of the points of interest that have to be displayed
'banks': [
{
lat: 29.14505,
lng: -82.189993
},
{
lat: 29.653236,
lng: -82.422619
}
],
'universities': [
{
lat: 29.679888,
lng: -82.430461
}
],
'power companies': [
{
lat: 29.203575,
lng: -81.039404
},
{
lat: 28.538235,
lng: -81.377389
}
]
},
log: function (message) {
//The code to display log messages in the logging area should go here
},
google_init: function (centerLat, centerLng) {
//The code to initialize a Google Map centered in centerLat, centerLng
//should go here
},
google_pin_point_location: function (lat, lng, category) {
//The code to add a pin to the map in the point
//identified by (lat, lng) should go here.
//Category may be used for displaying additional information
//about the point of interest in the bubble
}
};
$(function(){
//Functions and variable that are
//Included within MYAPP can be called from here.
//e.g. MYAPP.data
});
Please Whitelist JSFiddle in your content blocker.
Help keep JSFiddle free for always by one of two ways:
Whitelist JSFiddle in your content blocker (two clicks)
Go PRO and get access to additional PRO features →
Join the 4+ million users, and keep the JSFiddle dream alive.
Ad-free
All ads in the editor and listing pages are turned completely off.
Use pre-released features
You get to try and use features (like the Palette Color Generator) months before everyone else.
Fiddle collections
Sort and categorize your Fiddles into multiple collections.
Private collections and fiddles
You can make as many Private Fiddles, and Private Collections as you wish!
Console
Debug your Fiddle with a minimal built-in JavaScript console.