// request GeoJSON feature data var counties = $.ajax({ url: "kyCounties.geojson", dataType: "json", success: function (result){ return result; }, error: function (xhr) { alert(xhr.statusText) } }); // once the county data is retrieved, we can start making a map! $.when(counties).done(function(){ // set up the map var map = $("#map").geomap({ center: [-85.632935, 37.857507], zoom: 7, services: [{ id: "toner", type: "tiled", src:"http://a.basemaps.cartocdn.com/light_all/{{:zoom}}/{{:tile.column}}/{{:tile.row}}.png" }] }); // parse the responseText property from the feature data request as JSON counties = JSON.parse(counties.responseText); // add and style the feature data map.geomap("append", counties, { fill: "#2196F3", fillOpacity: 0.75, stroke: "#212121", strokeOpacity: 1, strokeWidth: 1 }); });