web/modules/custom/wildlife_maps/js/wildlife_search.behaviors.location-search-map.js
// Load in location data in to the info window.
Load in location data in to the info window.
Load in location data in to the info window .
function loadMapNodeInfo(location, infoWindow, pin, map) {
        $.ajax({
          type: 'GET',
          url: '/map-ajax/' + location.uuid + '/' + location.type
        }).done(function(data) {
          if (location.distance) {
            var $contents = $(data);
            $contents.wrap('<div class="container" />');
            $contents.find('.node__title').before(location.distance);
            infoWindow.setContent($contents.parent().html());
          }
          else {
            infoWindow.setContent(data);
          }
          infoWindow.open(map, pin);
        });
      }
function loadMapNodeInfo ( location , infoWindow , pin , map ) { $ . ajax ( { type : 'GET' , url : '/map-ajax/' + location . uuid + '/' + location . type } ) . done ( function ( data ) { if ( location . distance ) { var $contents = $ ( data ) ; $contents . wrap ( '<div class="container" />' ) ; $contents . find ( '.node__title' ) . before ( location . distance ) ; infoWindow . setContent ( $contents . parent ( ) . html ( ) ) ; } else { infoWindow . setContent ( data ) ; } infoWindow . open ( map , pin ) ; } ) ; }
Load in location data in to the info window.
Load in location data in to the info window .