-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Prateek parhi
committed
May 3, 2019
0 parents
commit d732ef2
Showing
12 changed files
with
784 additions
and
0 deletions.
There are no files selected for viewing
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,89 @@ | ||
<?xml version="1.0" encoding="UTF-8"?> | ||
<kml xmlns="http://earth.google.com/kml/2.0"> | ||
<Document> | ||
<Style id="z1"> | ||
<IconStyle><Icon><href>http://maps.google.com/mapfiles/kml/pushpin/ylw-pushpin.png</href></Icon></IconStyle> | ||
</Style> | ||
<Style id="nearest"> | ||
<LineStyle> | ||
<color>7f0000ff</color> | ||
<width>8</width> | ||
</LineStyle> | ||
</Style> | ||
<Placemark><name>Ellendale Pl</name> | ||
<styleUrl>#z1</styleUrl><Point><coordinates>-118.288866,34.031748</coordinates></Point> | ||
</Placemark> | ||
<Placemark><name>Orchard Ave</name> | ||
<styleUrl>#z1</styleUrl><Point><coordinates>-118.288262,34.028371</coordinates></Point> | ||
</Placemark> | ||
<Placemark><name>Vermont Ave</name> | ||
<styleUrl>#z1</styleUrl><Point><coordinates>-118.291541,34.025607</coordinates></Point> | ||
</Placemark> | ||
<Placemark><name>Figueroa St</name> | ||
<styleUrl>#z1</styleUrl><Point><coordinates>-118.280103,34.021895</coordinates></Point> | ||
</Placemark> | ||
<Placemark><name>Mcclintok</name> | ||
<styleUrl>#z1</styleUrl><Point><coordinates>-118.287602,34.024325</coordinates></Point> | ||
</Placemark> | ||
<Placemark><name>SGM</name> | ||
<styleUrl>#z1</styleUrl><Point><coordinates>-118.289053,34.021449</coordinates></Point> | ||
</Placemark> | ||
<Placemark><name>USC BookStore</name> | ||
<styleUrl>#z1</styleUrl><Point><coordinates>-118.286601,34.020773</coordinates></Point> | ||
</Placemark> | ||
<Placemark><name>Tommy Trojan</name> | ||
<styleUrl>#z1</styleUrl><Point><coordinates>-118.285451,34.020555</coordinates></Point> | ||
</Placemark> | ||
<Placemark><name>Leavey Library</name> | ||
<styleUrl>#z1</styleUrl><Point><coordinates>-118.282912,34.021787</coordinates></Point> | ||
</Placemark> | ||
<Placemark><name>Exposition</name> | ||
<styleUrl>#z1</styleUrl><Point><coordinates>-118.282274,34.018429</coordinates></Point> | ||
</Placemark> | ||
<Placemark><name>Ralph's</name> | ||
<styleUrl>#z1</styleUrl><Point><coordinates>-118.291335,34.032799</coordinates></Point> | ||
</Placemark> | ||
<Placemark><name>West Adams Blvd</name> | ||
<styleUrl>#z1</styleUrl><Point><coordinates>-118.286460,34.032707</coordinates></Point> | ||
</Placemark> | ||
<Placemark> | ||
<Polygon> | ||
<outerBoundaryIs> | ||
<LinearRing> | ||
<coordinates> | ||
-118.282274,34.018429 | ||
-118.289053,34.021449 | ||
-118.291541,34.025607 | ||
-118.291335,34.032799 | ||
-118.28646,34.032707 | ||
-118.280103,34.021895 | ||
-118.282274,34.018429 | ||
</coordinates> | ||
</LinearRing> | ||
</outerBoundaryIs> | ||
</Polygon> | ||
<Style> | ||
<LineStyle> | ||
<color>7fff0000</color> | ||
<width>8</width> | ||
</LineStyle> | ||
<PolyStyle> | ||
<color>7FAAAAAA</color> | ||
<fill>1</fill> | ||
<outline>1</outline> | ||
</PolyStyle> | ||
</Style> | ||
</Placemark> | ||
<Placemark> | ||
<styleUrl>#nearest</styleUrl> | ||
<LineString> | ||
<coordinates> | ||
-118.291335,34.032799, -118.288866,34.031748 | ||
-118.288262,34.028371, -118.288866,34.031748 | ||
-118.28646,34.032707, -118.288866,34.031748 | ||
-118.291541,34.025607, -118.288866,34.031748 | ||
</coordinates> | ||
</LineString> | ||
</Placemark> | ||
</Document></kml> | ||
|
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,68 @@ | ||
{\rtf1\ansi\ansicpg1252\cocoartf1671\cocoasubrtf100 | ||
{\fonttbl\f0\fswiss\fcharset0 Helvetica;} | ||
{\colortbl;\red255\green255\blue255;} | ||
{\*\expandedcolortbl;;} | ||
\margl1440\margr1440\vieww33400\viewh18480\viewkind0 | ||
\pard\tx720\tx1440\tx2160\tx2880\tx3600\tx4320\tx5040\tx5760\tx6480\tx7200\tx7920\tx8640\pardirnatural\partightenfactor0 | ||
|
||
\f0\fs24 \cf0 -118.288866,34.031748 Ellendale\ | ||
-118.288262,34.028371 Orchard Ave\ | ||
-118.291541,34.025607 Vermont Ave\ | ||
-118.280103,34.021895 Figueroa St\ | ||
-118.287602,34.024325 Mcclintok\ | ||
-118.289053,34.021449 SGM\ | ||
-118.286601,34.020773 USC BookStore\ | ||
-118.285451,34.020555 Tommy Trojan\ | ||
-118.283537,34.023030 Trousdale Parkway\ | ||
-118.282912,34.021787 Leavey Library\ | ||
-118.282274,34.018429 Exposition \ | ||
-118.291359,34.028425 Lion's Bike Shop\ | ||
-118.291335,34.032799 Ralph's\ | ||
\ | ||
\ | ||
let data = [\ | ||
\{"long":-118.288866,"lat":34.031748,"name":"Ellendale"\},\ | ||
\{"long":-118.288262,"lat":34.028371,"name": "Orchard Ave"\},\ | ||
\{"long":-118.291541,"lat":34.025607,"name":"Vermont Ave"\},\ | ||
\{"long":-118.280103,"lat":34.021895,"name": "Figueroa St"\},\ | ||
\{"long":-118.287602,"lat":34.024325,"name": "Mcclintok"\},\ | ||
\{"long":-118.289053,"lat":34.021449,"name": "SGM"\},\ | ||
\{"long":-118.286601,"lat":34.020773,"name": "USC BookStore"\},\ | ||
\{"long":-118.285451,"lat":34.020555,"name": "Tommy Trojan"\},\ | ||
\{"long":-118.282912,"lat":34.021787,"name": "Leavey Library"\},\ | ||
\{"long":-118.282274,"lat":34.018429,"name": "Exposition"\},\ | ||
\{"long":-118.291335,"lat":34.032799,"name": "Ralph's"\},\ | ||
\{"long":-118.286460,"lat":34.032707,"name":"West Adams Blvd"\}\ | ||
];\ | ||
\ | ||
localStorage.setItem("USCdata",JSON.stringify(data));\ | ||
let dataStored = JSON.parse(localStorage.getItem("USCdata"));\ | ||
console.log(dataStored); \ | ||
\ | ||
function initMap() \{\ | ||
map = new OpenLayers.Map('map');\ | ||
basemap = new OpenLayers.Layer.OSM("Simple OSM Map");\ | ||
map.addLayer(basemap);\ | ||
markers = new OpenLayers.Layer.Markers("Markers");\ | ||
map.addLayer(markers);\ | ||
\}\ | ||
\ | ||
function addMarker(latitude, longitude) \{\ | ||
let lonLat = new OpenLayers.LonLat(longitude, latitude)\ | ||
.transform(\ | ||
new OpenLayers.Projection("EPSG:4326"), \ | ||
map.getProjectionObject() \ | ||
);\ | ||
let point = new OpenLayers.Marker(lonLat);\ | ||
markers.addMarker(point);\ | ||
map.setCenter(lonLat, 8);\ | ||
\}\ | ||
\ | ||
initMap();\ | ||
let a = dataStored; \ | ||
for(var indx in a) \{\ | ||
console.log(a[indx]);\ | ||
addMarker(a[indx].lat,a[indx].long,a[indx].name);\ | ||
\}\ | ||
\ | ||
} |
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,45 @@ | ||
let data = [ | ||
{"long":-118.288866,"lat":34.031748,"name":"Ellendale"}, | ||
{"long":-118.288262,"lat":34.028371,"name": "Orchard Ave"}, | ||
{"long":-118.291541,"lat":34.025607,"name":"Vermont Ave"}, | ||
{"long":-118.280103,"lat":34.021895,"name": "Figueroa St"}, | ||
{"long":-118.287602,"lat":34.024325,"name": "Mcclintok"}, | ||
{"long":-118.289053,"lat":34.021449,"name": "SGM"}, | ||
{"long":-118.286601,"lat":34.020773,"name": "USC BookStore"}, | ||
{"long":-118.285451,"lat":34.020555,"name": "Tommy Trojan"}, | ||
{"long":-118.282912,"lat":34.021787,"name": "Leavey Library"}, | ||
{"long":-118.282274,"lat":34.018429,"name": "Exposition"}, | ||
{"long":-118.291335,"lat":34.032799,"name": "Ralph's"}, | ||
{"long":-118.286460,"lat":34.032707,"name":"West Adams Blvd"} | ||
]; | ||
|
||
localStorage.setItem("USCdata",JSON.stringify(data)); | ||
let dataStored = JSON.parse(localStorage.getItem("USCdata")); | ||
console.log(dataStored); | ||
|
||
function initMap() { | ||
map = new OpenLayers.Map('map'); | ||
basemap = new OpenLayers.Layer.OSM("Simple OSM Map"); | ||
map.addLayer(basemap); | ||
markers = new OpenLayers.Layer.Markers("Markers"); | ||
map.addLayer(markers); | ||
} | ||
|
||
function addMarker(latitude, longitude,name) { | ||
let lonLat = new OpenLayers.LonLat(longitude, latitude) | ||
.transform( | ||
new OpenLayers.Projection("EPSG:4326"), | ||
map.getProjectionObject() | ||
); | ||
let point = new OpenLayers.Marker(lonLat); | ||
markers.addMarker(point); | ||
map.setCenter(lonLat, 8); | ||
} | ||
|
||
initMap(); | ||
let a = dataStored; | ||
for(var indx in a) { | ||
console.log(a[indx]); | ||
addMarker(a[indx].lat,a[indx].long,a[indx].name); | ||
} | ||
|
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Oops, something went wrong.