Skip to content

Instantly share code, notes, and snippets.

View garethpaul's full-sized avatar
:octocat:

Gareth Paul Jones (GPJ) garethpaul

:octocat:
View GitHub Profile
// Once the map loads we push the geoJson over the top.
map.on('load', function() {
// Power Lines
var url = 'geojson/power_lines.geojson';
map.addLayer({
'id': 'power_lines',
'type': 'line',
'source': {
'type': 'geojson',
'data': url
mapboxgl.accessToken = 'MAPBOX_TOKEN';
// Handle the Mapbox Map
var map = new mapboxgl.Map({
container: 'map',
style: 'mapbox://styles/mapbox/streets-v11',
center: [-122.626991, 38.244923], // starting position
zoom: 11 // starting zoom
});
@garethpaul
garethpaul / index.html
Created January 21, 2020 04:50
Power Map
<html>
<head>
<meta charset='utf-8' />
<title>Power Map</title>
<meta name='viewport' content='initial-scale=1,maximum-scale=1,user-scalable=no' />
<script src='https://api.tiles.mapbox.com/mapbox-gl-js/v1.4.1/mapbox-gl.js'></script>
<link href='https://api.tiles.mapbox.com/mapbox-gl-js/v1.4.1/mapbox-gl.css' rel='stylesheet' />
<link href='https://fonts.googleapis.com/css?family=Roboto&display=swap' rel='stylesheet' />
<link href='styles.css' rel='stylesheet' />
</head>
//
// ImageLoader.swift
// FSQNearby
//
// Created by GPJ on 1/19/20.
// Copyright © 2020 GPJ. All rights reserved.
//
import Combine
import Foundation
//
// IconView.swift
// FSQNearby
//
// Created by GPJ on 1/19/20.
// Copyright © 2020 GPJ. All rights reserved.
//
import SwiftUI
//
// CategoryIconView.swift
// FSQNearby
//
// Created by GPJ on 1/19/20.
// Copyright © 2020 GPJ. All rights reserved.
//
import SwiftUI
//
// AddressView.swift
// FSQNearby
//
// Created by GPJ on 1/19/20.
// Copyright © 2020 GPJ. All rights reserved.
//
import SwiftUI
//
// VenueItemView.swift
// FSQNearby
//
// Created by GPJ on 1/19/20.
// Copyright © 2020 GPJ. All rights reserved.
//
import SwiftUI
//
// VenueListView.swift
// FSQNearby
//
// Created by GPJ on 1/19/20.
// Copyright © 2020 GPJ. All rights reserved.
//
import SwiftUI
//
// VenueFetcher.swift
// FSQNearby
//
// Created by GPJ on 1/19/20.
// Copyright © 2020 GPJ. All rights reserved.
//
import Foundation