-
-
Notifications
You must be signed in to change notification settings - Fork 52
Embedding Food Oasis in Your Web Site
If you want to embed Food Oasis in your own web site, you may do so by including the following snippet in your HTML:
<iframe
src="https://la.foodoasis.net/widget"
allow="geolocation"
width="100%"
height="100%"
style="margin: 0; border: 2px solid #336699; box-sizing: border-box"
>
For example, the following HTML page will display a minimal page with Food Oasis embedded:
<html>
<body
style="margin: 1em; background-color: lightblue; font-family: sans-serif"
>
<h1>HTML Page Hosting Food Oasis</h1>
<div style="height: 80vh">
<iframe
src="https://la.foodoasis.net/widget"
allow="geolocation"
width="100%"
height="100%"
style="margin: 0; border: 2px solid #336699; box-sizing: border-box"
>
>
</iframe>
</div>
</body>
</html>
The resulting page should look like this:

The above code is to access the Los Angeles version of Food Oasis. You may use some of the other regions by substituting the appropriate URL, as shown on this wiki's Home Page. For example, the url for the src attribute should be "https://hi.foodoasis.net/widget" for Hawaii.
As an example of a site where the Food Oasis app is embedded, see https://www.hackforla.org/projects/food-oasis
(Only supported on the Los Angeles site at this time)
If you append a neighborhood council query string parameter to the URL, the map will show a shaded region representing the corresponding Los Angeles neighborhood council boundary, and center the map on the centroid of the neighborhood, for example, the URL
https://la.foodoasis.net/widget?neighborhood_id=74
Will outline the South Central LA neighborhood.
For example, our test page for the widget looks like this:

There is a LA City Geohub URL that publishes the neighborhood council information.
Here is a list of the neighborhood councils with their neighborhood ids that Food Oasis uses, where the neghborhoodId in the query string matches the id value in this table:
id | name |
---|---|
1 | Arleta |
2 | Arroyo Seco |
3 | Atwater Village |
4 | Bel Air-Beverly Crest |
5 | Boyle Heights |
6 | CANNDU |
7 | Canoga Park |
8 | Central Alameda |
9 | Central Hollywood |
10 | Central San Pedro |
11 | Chatsworth |
12 | Coastal San Pedro |
13 | Del Rey |
14 | Downtown Los Angeles |
15 | Eagle Rock |
16 | East Hollywood |
17 | Echo Park |
18 | Elysian Valley Riverside |
19 | Empowerment Congress Central |
20 | Empowerment Congress North |
21 | Empowerment Congress Southeast |
22 | Empowerment Congress Southwest |
23 | Empowerment Congress West |
24 | Encino |
25 | Foothill Trails District |
26 | Glassell Park |
27 | Granada Hills North |
28 | Granada Hills South |
29 | Greater Cypress Park |
30 | Greater Toluca Lake |
31 | Greater Valley Glen |
32 | Greater Wilshire |
33 | Harbor City |
34 | Harbor Gateway North |
35 | Harbor Gateway South |
36 | Hermon |
37 | Arts District Little Tokyo |
38 | Historic Cultural North |
39 | Historic Highland Park |
40 | Hollywood Hills West |
41 | Hollywood Studio District |
42 | Hollywood United |
43 | LA32 |
44 | Lake Balboa |
45 | Lincoln Heights |
46 | Los Feliz |
47 | MacArthur Park |
48 | Mar Vista |
49 | Mid City |
50 | Mid City West |
51 | Mission Hills |
52 | NoHo |
53 | North Hills East |
54 | North Hills West |
55 | North Hollywood Northeast |
56 | North Hollywood West |
57 | North Westwood |
58 | Northridge East |
59 | Northridge South |
60 | Northridge West |
61 | Northwest San Pedro |
62 | Olympic Park |
63 | Pacoima |
64 | Palms |
65 | Panorama City |
66 | Park Mesa Heights |
67 | P.I.C.O. |
68 | Pico Union |
69 | Porter Ranch |
70 | Rampart Village |
71 | Reseda |
72 | Sherman Oaks |
73 | Silver Lake |
74 | South Central |
75 | South Robertson |
76 | Studio City |
77 | Sun Valley |
78 | Sunland-Tujunga |
79 | Sylmar |
80 | Tarzana |
81 | United Neighborhoods |
82 | Valley Village |
83 | Van Nuys |
84 | Venice |
85 | Voices |
86 | Watts |
87 | West Adams |
88 | West Hills |
89 | West LA - Sawtelle |
90 | Westchester/Playa |
91 | Westlake North |
92 | Westlake South |
93 | Westside |
94 | Westwood |
95 | Wilmington |
96 | Wilshire Center Koreatown |
97 | Winnetka |
98 | Woodland Hills-Warner Center |
99 | Zapata King |