Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <script type="text/javascript">
- ///////////////////////////////////////////////////////////////////
- // Powered By MapsEasy.com Maps Generator
- // Please keep the author information as long as the maps in use.
- // You can find the free service at: http://www.MapsEasy.com
- ///////////////////////////////////////////////////////////////////
- function LoadGmaps() {
- var myLatlng = new google.maps.LatLng(<?=$this->initialCoordinates?>);
- var myOptions = {
- zoom: 16,
- center: myLatlng,
- disableDefaultUI: true,
- panControl: true,
- zoomControl: true,
- zoomControlOptions: {
- style: google.maps.ZoomControlStyle.DEFAULT
- },
- mapTypeControl: false,
- streetViewControl: false,
- mapTypeId: google.maps.MapTypeId.ROADMAP
- }
- var map = new google.maps.Map(document.getElementById("MyGmaps"), myOptions);
- <?php foreach($this->devices as $d): ?>
- var m<?=$d->id ?> = new google.maps.Marker({
- position: new google.maps.LatLng(<?=$d->map_position?>),
- map: map,
- title:<?='"'.$d->ssid.'"'?>
- // icon: 'markerIcon',
- });
- var iw<?=$d->id ?> = new google.maps.InfoWindow({
- content: <?='"'.$d->ssid.'"'?>
- });
- google.maps.event.addListener(m<?=$d->id ?>, "click", function (e) { iw<?=$d->id ?>.open(map, m<?=$d->id ?>); });
- <?php endforeach; ?>
- }
- </script>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement