Skip to content

Commit

Permalink
added fake markers
Browse files Browse the repository at this point in the history
  • Loading branch information
shearn89 committed Oct 9, 2011
1 parent 4849380 commit f193d16
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 2 deletions.
4 changes: 3 additions & 1 deletion main.rb
Expand Up @@ -8,13 +8,15 @@
DB = Sequel.connect('mysql://appathon:appathon@appathon.cdmwtnbgpare.eu-west-1.rds.amazonaws.com:3306/appathon')

get '/' do
@coords = ["55.9449704019074,-3.193202018737793","55.9518396,-3.1647041"]
@coords = {}
@buses = {}
erb :index
end

get '/app' do
# @coords = ["55.9449704019074,-3.193202018737793","55.9518396,-3.1647041"]
@coords = {"51.450402, 0.195193" => 13,"51.450, 0.196193" => 8, "51.459, 0.197"=> 18, "51.449, 0.1955" => 10, "51.451, 0.196" => 8, "51.460, 0.190" => 1, "51.453, 0.190" => 24, "51.452, 0.193"=>3, "51.4525, 0.192"=> 10}
@buses = {"51.4539, 0.185"=> 1}
erb :app
end

Expand Down
13 changes: 12 additions & 1 deletion views/layout.erb
Expand Up @@ -76,11 +76,22 @@ function handleNoGeolocation(errorFlag) {
position: new google.maps.LatLng(51.455402, 0.194193),
content: 'You are here.'
};
var image = '/images/Google\ Maps\ Markers/blue_MarkerY.png'
marker_you = new google.maps.Marker({
position: new google.maps.LatLng(51.455402, 0.194193),
map: map,
title: 'You are here.'
title: 'You are here.',
icon: image
});
var busimage = '/images/Google\ Maps\ Markers/green_MarkerB.png'
<% @buses.each do |k,v| %>
marker = new google.maps.Marker({
position: new google.maps.LatLng(<%= k %>),
map: map,
title: "bus stop here",
icon: busimage
});
<% end %>
<% @coords.each do |k,v| %>
marker = new google.maps.Marker({
position: new google.maps.LatLng(<%= k %>),
Expand Down

0 comments on commit f193d16

Please sign in to comment.