Skip to content

Instantly share code, notes, and snippets.

<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"
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width">
<title>JS Bin</title>
</head>
<body>
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()
}
}
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)
import SwiftUI
struct ContentView: View {
var body: some View {
List() {
Text("")
}
}
}
if let windowScene = scene as? UIWindowScene {
let window = UIWindow(windowScene: windowScene)
window.rootViewController = ViewController()
self.window = window
window.makeKeyAndVisible()
}
google.maps.event.addListener(marker, "click", () => {
infowindow.setContent(`<div class="ui header">${place.name}</div><p>${place.vicinity}</p>`);
infowindow.open(map, marker);
});
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;
<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>
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();