Skip to content

Commit

Permalink
Updating the env file to use the full mapbox integration url and clea…
Browse files Browse the repository at this point in the history
…ning up the location url a bit
  • Loading branch information
feydan committed Jan 18, 2018
1 parent 0bd6c5f commit 8154fb5
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion .env.dist
Original file line number Diff line number Diff line change
@@ -1 +1 @@
MAPBOX_INTEGRATION_URL=yourmapboxintegrationurl
MAPBOX_INTEGRATION_URL="yourmapboxintegrationurl"
4 changes: 2 additions & 2 deletions public/javascripts/controllers/map.js
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ wicItApp.controller('MapCtrl', function ($scope, $http, leafletEvents, leafletDa
var markerIcon = iconFactory('image/marker.png', 'image/marker@2x.png', 'image/marker_shadow.png', 'image/marker_shadow@2x.png', 30, 30);
// var tileUrl = "https://{s}.tiles.mapbox.com/v4/" + mapId + "/{z}/{x}/{y}.png?access_token=" + mapToken;
var tileUrl = Constants.mapboxIntegrationUrl;
var locationsBaseUrl = 'https://data.chhs.ca.gov/api/3/action/datastore_search_sql?sql=SELECT * FROM "ee10b67b-2b93-47e7-aa41-cecfbbd32e17" WHERE ';
var locationsBaseUrl = 'https://data.chhs.ca.gov/api/3/action/datastore_search_sql';
var prevBounds = false;
var curBounds = false;

Expand Down Expand Up @@ -129,7 +129,7 @@ wicItApp.controller('MapCtrl', function ($scope, $http, leafletEvents, leafletDa
var nw = curBounds.getNorthWest();
var se = curBounds.getSouthEast();
var locationsUrl = locationsBaseUrl;
locationsUrl += '"Longitude" between ' + nw.lng + ' and ' + se.lng + ' AND "Latitude" between ' + se.lat + ' and ' + nw.lat;
locationsUrl += '?sql=SELECT * FROM "ee10b67b-2b93-47e7-aa41-cecfbbd32e17" WHERE "Longitude" between ' + nw.lng + ' and ' + se.lng + ' AND "Latitude" between ' + se.lat + ' and ' + nw.lat;
return $http.get(locationsUrl).success(displayLocations).error(updateNearbyLocationsError);

function displayLocations(data) {
Expand Down

0 comments on commit 8154fb5

Please sign in to comment.