This repository has been archived by the owner on Jun 16, 2019. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 770
Create custom-css_example.html #23
Open
XmlmXmlmX
wants to merge
1
commit into
googlearchive:gh-pages
Choose a base branch
from
XmlmXmlmX:patch-1
base: gh-pages
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from all commits
Commits
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,99 @@ | ||
<!doctype html> | ||
<html> | ||
<head> | ||
<meta charset="utf-8"> | ||
<title>MarkerClusterer v3 Simple Example</title> | ||
<style > | ||
body { | ||
margin: 0; | ||
padding: 10px 20px 20px; | ||
font-family: Arial; | ||
font-size: 16px; | ||
} | ||
#map-container { | ||
padding: 6px; | ||
border-width: 1px; | ||
border-style: solid; | ||
border-color: #ccc #ccc #999 #ccc; | ||
-webkit-box-shadow: rgba(64, 64, 64, 0.5) 0 2px 5px; | ||
-moz-box-shadow: rgba(64, 64, 64, 0.5) 0 2px 5px; | ||
box-shadow: rgba(64, 64, 64, 0.1) 0 2px 5px; | ||
width: 600px; | ||
} | ||
#map { | ||
width: 600px; | ||
height: 400px; | ||
} | ||
.custom-pin { | ||
height: 4em; | ||
line-height: 4em; | ||
width: 4em; | ||
text-align: center; | ||
cursor: pointer; | ||
color: white; | ||
position: absolute; | ||
font-size: 1em; | ||
font-family: Verdana; | ||
background: url('img/m2.svg') no-repeat 0 0 transparent; | ||
} | ||
</style> | ||
|
||
<script src="https://maps.googleapis.com/maps/api/js"></script> | ||
<script src="data.json"></script> | ||
<script> | ||
var script = '<script type="text/javascript" src="../src/markerclusterer'; | ||
if (document.location.search.indexOf('compiled') !== -1) { | ||
script += '_compiled'; | ||
} | ||
script += '.js"><' + '/script>'; | ||
document.write(script); | ||
</script> | ||
|
||
<script> | ||
function initialize() { | ||
var center = new google.maps.LatLng(37.4419, -122.1419); | ||
|
||
var map = new google.maps.Map(document.getElementById('map'), { | ||
zoom: 3, | ||
center: center, | ||
mapTypeId: google.maps.MapTypeId.ROADMAP | ||
}); | ||
|
||
var markers = []; | ||
for (var i = 0; i < 100; i++) { | ||
var dataPhoto = data.photos[i]; | ||
var latLng = new google.maps.LatLng(dataPhoto.latitude, | ||
dataPhoto.longitude); | ||
var marker = new google.maps.Marker({ | ||
position: latLng | ||
}); | ||
markers.push(marker); | ||
} | ||
var options = { | ||
cssClass:'custom-pin' | ||
}; | ||
var markerCluster = new MarkerClusterer(map, markers, options); | ||
} | ||
google.maps.event.addDomListener(window, 'load', initialize); | ||
</script> | ||
<script> | ||
var _gaq = _gaq || []; | ||
_gaq.push(['_setAccount', 'UA-12846745-20']); | ||
_gaq.push(['_trackPageview']); | ||
|
||
(function() { | ||
var ga = document.createElement('script'); ga.type = 'text/javascript'; ga.async = true; | ||
ga.src = ('https:' === document.location.protocol ? 'https://ssl' : 'http://www') + '.google-analytics.com/ga.js'; | ||
var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(ga, s); | ||
})(); | ||
</script> | ||
</head> | ||
<body> | ||
<h3>A simple example of MarkerClusterer (100 markers)</h3> | ||
<p> | ||
<a href="?compiled">Compiled</a> | | ||
<a href="?">Standard</a> version of the script. | ||
</p> | ||
<div id="map-container"><div id="map"></div></div> | ||
</body> | ||
</html> |
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Match the same indentation as above please.