[frontend]: Add all data sources to map
This commit is contained in:
@ -9,6 +9,9 @@ const PERMANENT_DATA_API = "https://a6y312dpuj.execute-api.us-east-1.amazonaws.c
|
||||
const dataSources = [
|
||||
{ id: "IrishRailTrains", name: "Irish Rail Trains", url: `${TRANSIENT_DATA_API}?objectType=IrishRailTrain` },
|
||||
{ id: "IrishRailStations", name: "Irish Rail Stations", url: `${PERMANENT_DATA_API}?objectType=IrishRailStation` },
|
||||
{ id: "LuasStops", name: "Luas Stops", url: `${PERMANENT_DATA_API}?objectType=LuasStop` },
|
||||
{ id: "BusStops", name: "Bus Stops", url: `${PERMANENT_DATA_API}?objectType=BusStop` },
|
||||
{ id: "Buses", name: "Buses", url: `${TRANSIENT_DATA_API}?objectType=Bus` },
|
||||
];
|
||||
|
||||
function App() {
|
||||
|
@ -8,6 +8,9 @@ import "leaflet.markercluster/dist/MarkerCluster.Default.css";
|
||||
|
||||
import trainStationIconURL from "../assets/icons/train-station.png";
|
||||
import trainIconURL from "../assets/icons/train.png";
|
||||
import luasIconURL from "../assets/icons/tram-station.png";
|
||||
import busStopIconURL from "../assets/icons/bus-station.png";
|
||||
import busIconURL from "../assets/icons/bus.png";
|
||||
|
||||
// Fix Leaflet marker icon issue
|
||||
delete L.Icon.Default.prototype._getIconUrl;
|
||||
@ -19,7 +22,10 @@ L.Icon.Default.mergeOptions({
|
||||
|
||||
const icons = new Map([
|
||||
["IrishRailStation", new Icon({ iconUrl: trainStationIconURL, iconSize: [24, 24] })],
|
||||
["IrishRailTrain", new Icon({ iconUrl: trainIconURL, iconSize: [24, 24] })],
|
||||
["IrishRailTrain", new Icon({ iconUrl: trainIconURL, iconSize: [38, 38] })],
|
||||
["LuasStop", new Icon({ iconUrl: luasIconURL, iconSize: [38, 38] })],
|
||||
["BusStop", new Icon({ iconUrl: busStopIconURL, iconSize: [24, 24] })],
|
||||
["Bus", new Icon({ iconUrl: busIconURL, iconSize: [38, 38] })],
|
||||
]);
|
||||
|
||||
const MapComponent = ({ markers, clusteringEnabled }) => {
|
||||
|
@ -5,6 +5,9 @@ const Sidebar = ({ selectedSources, setSelectedSources, clusteringEnabled, setCl
|
||||
const dataSources = [
|
||||
{ id: "IrishRailTrains", name: "Irish Rail Trains" },
|
||||
{ id: "IrishRailStations", name: "Irish Rail Stations" },
|
||||
{ id: "LuasStops", name: "Luas Stops" },
|
||||
{ id: "BusStops", name: "Bus Stops" },
|
||||
{ id: "Buses", name: "Buses", },
|
||||
];
|
||||
|
||||
return (
|
||||
|
Reference in New Issue
Block a user