aaaronivaaan / kml-samples

Automatically exported from code.google.com/p/kml-samples
0 stars 0 forks source link

Only subset of markers from KML showing #222

Open GoogleCodeExporter opened 8 years ago

GoogleCodeExporter commented 8 years ago
Which products are affected?

Google Maps API

What steps will reproduce the problem?
1. Go to
http://yavin1.veginformatikk.no:8080/kart/index.jsp?kml=http://yavin1.veginforma
tikk.no:8080/kart/14_jan_Full2.kml
2. Alternatively, reproduce using attached kml file and source code
included below.

What is the expected output or behavior? What do you see instead?
I expexted to see all the placemarks given in the KML file, but only a 
subset of the placemarks actually shows.

What application versions (if any) are you using?
2

Which operating systems and browsers are affected?

On the client side, this has only been tested using firefox running on
WinXP. On the server side the page is running on a Tomcat 5.5 standalone.

Please provide any additional information (code snippets/links) below.

Source code of index.jsp (kml attached):

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
    "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml"
xmlns:v="urn:schemas-microsoft-com:vml">
  <head>
    <meta http-equiv="content-type" content="text/html; charset=utf-8"/>
    <title>VegInformatikk Dynamic Google Maps Server</title>
    <script
src="http://maps.google.com/maps?file=api&amp;v=2&amp;sensor=false&amp;key=ABQIA
AAAHs_ztk-aT_hbcH0Et0wXwBSSKsRLHF_UA8W3ImayW_qZypz9nhTqHA6vV6Nv_DAR_5x1hLm9rkPbG
w"
            type="text/javascript"></script>
    <script type="text/javascript">

    function initialize() {
      if (GBrowserIsCompatible()) {

        var map = new GMap2(document.getElementById("map_canvas"));
        map.setCenter(new GLatLng(64, 10), 3);
        map.addControl(new GLargeMapControl());

        var geoXml = new GGeoXml(" <%= request.getParameter("kml") %> ");
        map.addOverlay(geoXml);
        geoXml.gotoDefaultViewport(map);

      }
    }

    </script>
  </head>

  <%
        if (request.getParameter("kml") == null) {
            out.println("<body> No KML file given. A URL to a valid kml
file must be given as a get parameter with name kml. Append something like
\"?kml=http://myhost/mykmlfile.kml\" to the url</body>");
        } else {
            if (request.getParameter("mapHeigthPixels") == null ||
request.getParameter("mapWidthPixels") == null){
                out.println("<body onload=\"initialize()\"
onunload=\"GUnload()\"> <div id=\"map_canvas\" style=\"width: 750px;
height: 500px\"></div></body>");
            }
            else{
                out.print("<body onload=\"initialize()\" onunload=\"GUnload()\">
<div id=\"map_canvas\" style=\"width: ");
                out.print(request.getParameter("mapWidthPixels")); 
                out.print("px; height: "); 
                out.print(request.getParameter("mapHeigthPixels"));
                out.print("px\"></div></body>");
            }
        }
    %>

</html>

Original issue reported on code.google.com by oyvindv....@gmail.com on 19 Jan 2009 at 9:37

Attachments:

GoogleCodeExporter commented 8 years ago

Original comment by api.roman.public@gmail.com on 20 Jan 2009 at 6:35