This works for me (I always put the whole script into the code.embed.page. 
If it runs, I move the parts into their approbiate location.)

Page code.embed.googlemaps:

<script src="https://maps.googleapis.com/maps/api/js";></script>
<style>
      #map_canvas {
        width: 500px;
        height: 400px;
      }
    </style>
    
    <script>
      function initialize() {
        var map_canvas = document.getElementById('map_canvas');
        var map_options = {
          center: new google.maps.LatLng(61.18303, 8.47852),
          zoom: 5,
          mapTypeId: google.maps.MapTypeId.ROADMAP
        }
        var map = new google.maps.Map(map_canvas, map_options)
        
        // -------------- MARKER 1
    var marker1 = new google.maps.Marker({
    position: new google.maps.LatLng(59.96384, 11.04120),
    map: map /*,
    icon: 'img/bike5.png' */
    });


    // MARKER 1'S INFO WINDOW
    var infowindow1 = new google.maps.InfoWindow({
    content: 'Name<br />Location<br />Date<br /><br /><a 
href="http://www.db.no"; target="_blank">Read more(test link)</a>'
    });
    // End of infowindow code

    // Adding a click event to the marker
    google.maps.event.addListener(marker1, 'click', function() {
    // Calling the open method of the infoWindow
    infowindow1.open(map, marker1);
    });
    // -------- END OF 1st MARKER


    // -------------- MARKER 2
    var marker2 = new google.maps.Marker({
    position: new google.maps.LatLng(60.63040, 8.56102),
    map: map /*,
    icon: 'img/bike5.png' */
    });

    // MARKER 2'S INFO WINDOW
    var infowindow2 = new google.maps.InfoWindow({
    content: 'Name<br />Location<br />Date<br /><br /><a 
href="http://www.db.no"; target="_blank">Read more(test link)</a>'
    });
    // End of infowindow code

    // Adding a click event to the marker
    google.maps.event.addListener(marker2, 'click', function() {
    // Calling the open method of the infoWindow
    infowindow2.open(map, marker2);
    });
    // -------- END OF 2nd MARKER
        
      }
      google.maps.event.addDomListener(window, 'load', initialize);</script>
<div id="map_canvas"></div>

and on your page put [(embed googlemaps)] .
http://checcit.eu/fieldone/index.php?p=test.googlemaps

Greetings, Martin

-- 
You received this message because you are subscribed to the Google Groups 
"BoltWire" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
Visit this group at http://groups.google.com/group/boltwire.
For more options, visit https://groups.google.com/d/optout.

Reply via email to