Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <script type="text/javascript" src="index.js" class="33.870959 -118.027830 33.803498 -118.279524 34.087291 -118.259329"></script>
- function initMap()
- { var center = {lat: 34.046438, lng: -118.259653};
- var map = new google.maps.Map(document.getElementById('map'), {
- zoom: 9,
- center: center
- });
- var params = document.body.getElementsByTagName('script');
- query = params[0].classList;
- var locations = [
- ['hwlo', query[0], query[1]],
- ['hwlo', query[2], query[3]],
- ['hwlo', query[4], query[5]],
- ];
- var infowindow = new google.maps.InfoWindow({});
- var marker, count;
- for (count = 0; count < locations.length; count++) {
- marker = new google.maps.Marker({
- position: new google.maps.LatLng(locations[count][1], locations[count][2]),
- map: map,
- title: document.currentScript.getAttribute('one')
- });
- google.maps.event.addListener(marker, 'click', (function (marker, count) {
- return function () {
- infowindow.setContent(document.currentScript.getAttribute('one'));
- infowindow.open(map, marker);
- }
- })(marker, count));
- }
- }
- var params = document.body.getElementsByTagName('script');
- query = params[0].classList;
- var locations = [
- ['hwlo', query[0], query[1]],
- ['hwlo', query[2], query[3]],
- ['hwlo', query[4], query[5]],
- ];
- var locations = [
- ['hwlo', query[0], query[1]],
- ['hwlo', query[2], query[3]],
- ['hwlo', query[4], query[5]],
- ];
- var locations = [];
- for (i = 0; i < query.length; i = i + 2) {
- locations.push([
- 'hwlo', query[i], query[i + 1]
- ]);
- }
Add Comment
Please, Sign In to add comment