}; map = new google.maps.Map(document.getElementById('map-canvas'), mapOptions); var styledMapOptions = { name: 'Custom Style' }; inputMarker = new google.maps.Marker({ position: worldCenter, map: map, icon: new google.maps.MarkerImage("http://chart.apis.google.com/chart?chst=d_map_pin_letter&chld=%E2%80%A2|" +"<?php echo User::getColor(); ?> ") }); google.maps.event.addListener(map, 'click', function(e) { document.getElementById('lat').value = e.latLng.lat(); document.getElementById('long').value = e.latLng.lng(); inputMarker.setPosition(e.latLng); }); var customMapType = new google.maps.StyledMapType(featureOpts, styledMapOptions); map.mapTypes.set(MY_MAPTYPE_ID, customMapType); }
<?php session_start(); $whitelist = array('lat', 'long', 'answer', 'questionNumber'); require '../controller/dbsettings.php'; if ($lat == "") { $lat = 0; } if ($long == "") { $long = 0; } $color = User::getColor(); //die ($color); if ($_SESSION["user_id"] == 0) { die("Sorry this shouldnt happen - tell me about it..."); } $correct = Answer::loadCorrect($questionNumber); //place currently is true or false if they could submit (meaning 1st time) //die ($questionNumber); //echo $sql; //die(); $game = Game::findGame(); if ($game->type == "geo" || $game->type == "places" || $game->type == "pt") { $distanceAway = LatLong::findDistance($correct->location, new LatLong($lat, $long)); } else { $distanceAway = abs($answer - $correct->value); } if ($answer > 100000) { $distanceAway = round($distanceAway, -5); } //die ($questionNumber);