(CLOSED)Adding Google maps to Appengine -


I'm having trouble connecting Google Maps to my webpage on Google Apps. When I run it, it works fine is.

My index.html is as follows:

  & lt ;! DOCTYPE html public "- // W3C // DTD XHTML 1.1 /" n "" http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd"> & Lt; Html xmlns = "http://www.w3.org/1999/xhtml" xml: lang = "en" lang = "en" & gt; & Lt; Top & gt; & Lt; Link type = "text / css" rel = "stylesheet" href = "style.css" & gt; & Lt; Script type = "text / javascript" language = "javascript" src = "js / mingitegevus.js" & gt; & Lt; / Script & gt; & Lt; Script src = "https://maps.googleapis.com/maps/api/js?sensor=true" & gt; & Lt; / Script & gt; & Lt; Script type = "text / javascript" language = "javascript" src = "js / map_canvas_initialize () .js" & gt; & Lt; / Script & gt; & Lt; Meta http-equiv = "content-type" content = "text / html; charset = UTF-8" & gt; & Lt; Title & gt; Spordikaart & lt; / Title & gt; & Lt; / Head & gt; & Lt; Body & gt; & Lt; Table & gt; & Lt; TR & gt; & Lt; P id = "test" & gt; Wing program & lt; / P & gt; & Lt; / TR & gt; & Lt; TR & gt; & Lt; Form & gt; & Lt; Input type = 'button' value = "touch me" onclick = "touch ()"; & Gt; & Lt; / Form & gt; & Lt; / TR & gt; & Lt; / Table & gt; & Lt; Div id = "map_canvas" square = "map_canvas" & gt; & Lt; / Div & gt; & Lt; / Body & gt; & Lt; / Html & gt;  

then map_canvas_initialize () JS does not work / loads. Appengines log does not tell much:

  / js / map_canvas_initialize () JS 200 81ms 0kb Mozilla / 5.0 (Windows NT 6.1; WOW64) AppleWebKit / 537.36 (like KHTML, Lizard) Chrome / 32.0.1700.107 Safari / 537.36 module = default version = 1 90.213.123.96 - - [18 / Feb / 2014: 04: 51: 12 -0800] "Received /js/map_canvas_initialize().js HTTP / 1.1" 200 59 "Http: //spordikaart.appspot.com/" Mozilla / 5.0 (Windows NT 6.1; WA 64) Apple WebKat / 537.36 (KHML, like GECO) Chrome / 32.0.1700.107 Safari / 537.36 "" Sprintikart.epspot.com " Ms = 81 cp_ms = 2902 cpm_usd = 0. 00007 app_engine_release = 1.8.9 Example = 00c61b117c9fde1367f47afa69ce18e068eec8  

map_canvas_initialize () js is the following:. InitialLocation; browser on browser; L = new google.maps.LatLng (52, 22); function initialize () {var map_canvas = document.getElementById ('map_canvas'); Var map options = {zoom: 18, type map: google.maps.MapTypeId. ROADMAP} var map = new google.maps.Map (map_canvas, mapOptions); If (navigator.geolocation) {browserSupportFlag = true; Navigator.geolocation.getCurrentPosition (function (status) {initialLocation = new google.maps.LatLng (position.coords.latitude, position.coords.longitude); map.setCenter (initialLocation);}, function () {handleNoGeolocation (browserSupportFlag) ;}); } Other {browserSupportFlag = false; HandleNoGeolocation (browserSupportFlag); } Function handle nonGolocation (error flag) {if (errorFlag == true) {Warning ("Geolocation service failed"); Starting position = L; } And {warnings ("Browser does not support geographic location."); Starting position = L; } Map.setCenter (initial location); }} Google.maps.event.addDomListener (window, 'load', start);

web.xml:

  & lt ;? Xml version = "1.0" encoding = "UTF-8"? & Gt; & Lt; Web application xmlns: xsi = "http://www.w3.org/2001/XMLSchema-instance" xmlns = "http://java.sun.com/xml/ns/javaee" xmlns: web = "http: / /java.sun.com/xml/ns/javaee/web-app_2_5.xsd "xsi: schemaLocation =" http://java.sun.com/xml/ns/javaee http: //java.sun com / xml / Ns / javaee / web-app_2_5.xsd "version =" 2.5 "& gt; & Lt; Servlet & gt; & Lt; Servlet-name & gt; Kaart & lt; / Servlet-name & gt; & Lt; Servlet category & gt; Com.kaart.KaartServlet & lt; / Servlet category & gt; & Lt; / Servlet & gt; & Lt; Servlet-mapping & gt; & Lt; Servlet-name & gt; Kaart & lt; / Servlet-name & gt; & Lt; URL pattern & gt; * Js. & Lt; / Url pattern & gt; & Lt; / Servlet-mapping & gt; & Lt; Servlet-mapping & gt; & Lt; Servlet-name & gt; Kaart & lt; / Servlet-name & gt; & Lt; URL pattern & gt; * CSS. & Lt; / Url pattern & gt; & Lt; / Servlet-mapping & gt; & Lt; Servlet-mapping & gt; & Lt; Servlet-name & gt; Kaart & lt; / Servlet-name & gt; & Lt; URL pattern & gt; / & Lt; / URL pattern & gt; & Lt; / Servlet-mapping & gt; & Lt; Welcome-file-list & gt; & Lt; Welcome-file & gt; Index.html & lt; / Welcome-file & gt; & Lt; / Welcome-file-list & gt; & Lt; / Web application & gt;  

Project structure: project structure

Where to start any ideas?


Comments