This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<template> | |
<div class="ui cards" style="margin: 10px"> | |
<div class="ui icon input" style="width: 100%"> | |
<input type="text" placeholder="Search..." v-model="searchQuery" /> | |
<i class="search icon"></i> | |
</div> | |
<div | |
class="card ui fluid" | |
v-for="product in searchedProducts" | |
:key="product.id" |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<!DOCTYPE html> | |
<html> | |
<head> | |
<meta charset="utf-8"> | |
<meta name="viewport" content="width=device-width"> | |
<title>JS Bin</title> | |
</head> | |
<body> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
func scene(_ scene: UIScene, willConnectTo session: UISceneSession, options connectionOptions: UIScene.ConnectionOptions) { | |
if let windowScene = scene as? UIWindowScene { | |
let window = UIWindow(windowScene: windowScene) | |
window.rootViewController = UIHostingController(rootView: LandmarkList()) | |
self.window = window | |
window.makeKeyAndVisible() | |
} | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import UIKit | |
class ViewController: UIViewController { | |
var MillennialFoodTableView = UITableView() | |
override func viewDidLoad() { | |
super.viewDidLoad() | |
MillennialFoodTableView.frame = CGRect(x:0, y:0, width:view.bounds.width, height:view.bounds.height) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import SwiftUI | |
struct ContentView: View { | |
var body: some View { | |
List() { | |
Text("") | |
} | |
} | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
if let windowScene = scene as? UIWindowScene { | |
let window = UIWindow(windowScene: windowScene) | |
window.rootViewController = ViewController() | |
self.window = window | |
window.makeKeyAndVisible() | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
google.maps.event.addListener(marker, "click", () => { | |
infowindow.setContent(`<div class="ui header">${place.name}</div><p>${place.vicinity}</p>`); | |
infowindow.open(map, marker); | |
}); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
addLocationsToGoogleMaps() { | |
var map = new google.maps.Map(this.$refs['map'], { | |
zoom: 15, | |
center: new google.maps.LatLng(this.lat, this.lng), | |
mapTypeId: google.maps.MapTypeId.ROADMAP | |
}); | |
this.places.forEach((place) => { | |
const lat = place.geometry.location.lat; | |
const lng = place.geometry.location.lng; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<div class="ui segment" style="max-height:500px;overflow:scroll"> | |
<div class="ui divided items"> | |
<div class="item" v-for="place in places" :key="place.id"> | |
<div class="content"> | |
<div class="header">{{place.name}}</div> | |
<div class="meta">{{place.vicinity}}</div> | |
</div> | |
</div> | |
</div> | |
</div> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
findCloseBuyButtonPressed() { | |
const URL = `https://cors-anywhere.herokuapp.com/https://maps.googleapis.com/maps/api/place/nearbysearch/json?location=${ | |
this.lat | |
},${this.lng}&type=${this.type}&radius=${this.radius * | |
1000}&key=[YOURAPIKEY]`; | |
axios | |
.get(URL) | |
.then(response => { | |
this.places = response.data.results; | |
this.addLocationsToGoogleMaps(); |
NewerOlder