// map center
var center = {lat: 2.855262784366583, lng: 105.4302978515625};
// marker position
//var factory = new google.maps.LatLng(2.855262784366583, 105.4302978515625);
function initialize() {
var mapOptions = {
center: center,
zoom: 7,
mapTypeId: google.maps.MapTypeId.ROADMAP
};
PRbounds = {
"south": 17.88124,
"west": -67.95158170000002,
"north": 18.5160099,
"east": -65.22110989999999
};
var bounds = new google.maps.LatLngBounds(new google.maps.LatLng(PRbounds.south, PRbounds.west), new google.maps.LatLng(PRbounds.north, PRbounds.east));
// Create a <script> tag and set the USGS URL as the source.
var script = document.createElement('script');
// This example uses a local copy of the GeoJSON stored at
// http://earthquake.usgs.gov/earthquakes/feed/v1.0/summary/2.5_week.geojsonp
script.src = 'https://developers.google.com/maps/documentation/javascript/examples/json/earthquake_GeoJSONP.js';
document.getElementsByTagName('head')[0].appendChild(script);
var map = new google.maps.Map(document.getElementById("map-canvas"),mapOptions);
map.fitBounds(bounds);
// Loop through the results array and place a marker for each
// set of coordinates.
window.eqfeed_callback = function(results) {
for (var i = 0; i < results.features.length; i++) {
var coords = results.features[i].geometry.coordinates;
var latLng = new google.maps.LatLng(coords[1],coords[0]);
// if (i < 10) bounds.extend(latLng);
var marker = new google.maps.Marker({
position: latLng,
map: map
});
// InfoWindow content
var content = '<div id="iw-container">' +
'<div class="iw-title">Porcelain Factory of Vista Alegre</div>' +
'<div class="iw-content">' +
'<div class="iw-subTitle">History</div>' +
...
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.
Fiddle Pages
Your fiddles accessible under a custom domain and a vanity path - the simplest hosting for your personal project.
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!
Get Fiddle Pages with PRO
Your fiddles accessible under a custom domain and a vanity path - the simplest hosting for your personal project.