Importing data into Google Maps from database

I’m trying to connect my Parse class to loop through the objects and output markers onto a google map.

The code i’m current trying to use is;

<!DOCTYPE html>
      html, body, #map { margin: 0; padding: 0; height: 100%; }
      var map;

      function initialize() {
        map = new google.maps.Map(document.getElementById('map'), {
          zoom: 10,
          center: new google.maps.LatLng(53.3478,-6.259),
          mapTypeId: google.maps.MapTypeId.TERRAIN
          // Apply the map style array to the map.

        // Create a <script> tag and set the Parse URL as the source.
        var script = document.createElement('script');
        script.src = '';

      // 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]);
          var marker = new google.maps.Marker({
            position: latLng,
            map: map
      google.maps.event.addDomListener(window, 'load', initialize)
    <div id="map"></div>

I’m not connecting to Parse so I know that is the start of my problem. If anyone could point me in the right direction - I’m at the start of my journey into learning javascript.

This topic was automatically closed 91 days after the last reply. New replies are no longer allowed.