Click here to Skip to main content
15,897,718 members
Home / Discussions / Android
   

Android

 
QuestionSending email via Intent Pin
Member 822518012-Feb-15 10:25
Member 822518012-Feb-15 10:25 
AnswerRe: Sending email via Intent Pin
Richard MacCutchan12-Feb-15 22:53
mveRichard MacCutchan12-Feb-15 22:53 
QuestionRe: Sending email via Intent Pin
David Crow13-Feb-15 5:41
David Crow13-Feb-15 5:41 
AnswerRe: Sending email via Intent Pin
Member 822518013-Feb-15 7:12
Member 822518013-Feb-15 7:12 
SuggestionRe: Sending email via Intent Pin
David Crow13-Feb-15 8:07
David Crow13-Feb-15 8:07 
GeneralRe: Sending email via Intent Pin
Member 822518013-Feb-15 10:26
Member 822518013-Feb-15 10:26 
QuestionChinese Gifts for provide solution of challenge QR-code scanning requirement Pin
Member 114409179-Feb-15 21:51
Member 114409179-Feb-15 21:51 
QuestionHelp with app Pin
jjamesx27-Feb-15 12:11
jjamesx27-Feb-15 12:11 
Trying to create an app, need some help
I am trying to create an android app that uses gmap. I want the user to be able to select predetermined starting and ending points and then be given directions between the two points. This is what i have come up with, but the map seems to be frozen and is not actually locating the points or giving directions. Where is my error?

HTML
<html>
<head>
  <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
  <title>LuxuryLodgesNZ</title>

  <link rel="stylesheet" type="text/css" href="style.css">
  <meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=3.0">
  <meta name="apple-touch-fullscreen" content="YES">
  <meta name="apple-mobile-web-app-capable" content="yes">
  <link rel="apple-touch-icon" href="icon.png">
</head>
<body>

<meta name="viewport" content="initial-scale=1.0, user-scalable=yes">
<meta charset="utf-8">

<script src="https://maps.googleapis.com/maps/api/js?v=3.exp"></script><script src="https://maps.gstatic.com/maps-api-v3/api/js/19/7a/main.js"></script>
<script>
	var directionsDisplay;
	var directionsService = new google.maps.DirectionsService();

	function initialize() {
		directionsDisplay = new google.maps.DirectionsRenderer();
		var Auckland = new google.maps.LatLng(-37.008222, 174.785025);
		var mapOptions = {
			zoom: 7,
			center: new google.maps.LatLng(-37.008222, 174.785025)
		};
		var map = new google.maps.Map(document.getElementById('map-canvas'),
									  mapOptions);
		directionsDisplay.setMap(map);
		directionsDisplay.setPanel(document.getElementById('directions-panel'));
		var control = document.getElementById('control');
		control.style.display = 'block';
		map.controls[google.maps.ControlPosition.TOP_CENTER].push(control);
	}



	function calcRoute() {
		var start = document.getElementById('start').value;
		var end = document.getElementById('end').value;
		var request = {
			origin:start,
			destination:end,
			travelMode: google.maps.TravelMode.DRIVING
		};
		directionsService.route(request, function(response, status) {
			if (status == google.maps.DirectionsStatus.OK) {
				directionsDisplay.setDirections(response);
			}
		});
	}



	google.maps.event.addDomListener(window, 'load', initialize);


</script>
<div id="control" style="height: 70px; overflow: hidden; top: 5px; margin-left: 0px; z-index: 5; border: 1px solid rgb(153, 153, 153); display: block; position: relative; background-color: rgb(5, 5, 5);"> <select id="start" onchange="calcRoute();"><option value="Auckland Airport Ray Emery Drive">Start
	<option value="41 towey st,oamaru">Pen-y-bryn lodge
	<option value="224 Rhodes Rd,	Christchurch">Otahuna Lodge
	<option value="11075 West Coast Hwy 73, Cass,Christchurch">Grasmere Lodge
	<option value="444 Wentworth Valley Road,Whangamata">Bushland Park Lodge
	<option value="214 Kawaha Point Rd,Kawaha Point,Rotorua">Peppers on the Point
	<option value="Western Lake road,Wellington">Wharekauhau Lodge
	</select>
	 <select id="end" onchange="calcRoute();"><option value="Auckland Airport
																  Ray Emery Drive">Destination
	<option value="41 towey st,oamaru">Pen-y-bryn lodge
	<option value="11075 West Coast Hwy 73, Cass,Christchurch">Grasmere Lodge
	<option value="Hapuku Lodge, station Rd,Kaikoura 7371">Hapuku Lodge
	<option value="3256 Motueka Valley Highway	Stanley Brook, Nelson">Stonefly Lodge
	<option value="Western Lake road,Wellington">Wharekauhau Lodge
	</select></div>


<div id="map-canvas" style="position: relative; height: 300px; border: 1px solid;"><div style="overflow: hidden;"></div></div>
<div id="directions-panel" style="position: relative; top 350px; border: 1px solid; color: rgb(3, 3, 3); background-color: rgb(247, 247, 247);"></div></body></html>

QuestionRe: Help with app Pin
David Crow12-Feb-15 7:41
David Crow12-Feb-15 7:41 
Questionprobleme l'hors d'installation des packages android SDK manager Pin
Member 114299235-Feb-15 7:20
Member 114299235-Feb-15 7:20 
SuggestionRe: probleme l'hors d'installation des packages android SDK manager Pin
Richard MacCutchan5-Feb-15 22:05
mveRichard MacCutchan5-Feb-15 22:05 
Questiondisplay image from remote sqlserver db in Android Pin
Member 5933975-Feb-15 0:58
Member 5933975-Feb-15 0:58 
AnswerRe: display image from remote sqlserver db in Android Pin
Richard MacCutchan5-Feb-15 2:46
mveRichard MacCutchan5-Feb-15 2:46 
SuggestionRe: display image from remote sqlserver db in Android Pin
David Crow5-Feb-15 4:04
David Crow5-Feb-15 4:04 
Questionmobile commerce android Pin
Member 114251573-Feb-15 16:39
Member 114251573-Feb-15 16:39 
AnswerRe: mobile commerce android Pin
Richard MacCutchan3-Feb-15 23:02
mveRichard MacCutchan3-Feb-15 23:02 
QuestionSmall App Help Pin
Asimmmm24-Jan-15 5:10
Asimmmm24-Jan-15 5:10 
AnswerRe: Small App Help Pin
Vidyasagar Patro7-Feb-15 7:03
Vidyasagar Patro7-Feb-15 7:03 
QuestionBeginning out. Suggestions, help, direction. Pin
Member 1139206621-Jan-15 6:31
Member 1139206621-Jan-15 6:31 
AnswerRe: Beginning out. Suggestions, help, direction. Pin
Member 1036419227-Jan-15 1:03
Member 1036419227-Jan-15 1:03 
AnswerRe: Beginning out. Suggestions, help, direction. Pin
Richard MacCutchan27-Jan-15 2:34
mveRichard MacCutchan27-Jan-15 2:34 
Questionfinding an android application developer Pin
Member 1137462014-Jan-15 2:20
Member 1137462014-Jan-15 2:20 
AnswerRe: finding an android application developer Pin
Richard MacCutchan14-Jan-15 3:57
mveRichard MacCutchan14-Jan-15 3:57 
QuestionEmotion Based Android app Pin
Member 1137002712-Jan-15 9:26
Member 1137002712-Jan-15 9:26 
SuggestionWhat kind of suggestions can you give to a beginner in android app developement? Pin
Tiffany_Summers10-Jan-15 13:30
Tiffany_Summers10-Jan-15 13:30 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.