Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8399767
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 9, 20262026-06-09T21:23:36+00:00 2026-06-09T21:23:36+00:00

I am having trouble with the following code: function initialize() { //myLatLng = new

  • 0

I am having trouble with the following code:

function initialize() {
            //myLatLng = new google.maps.LatLng(37.422104808,-122.0838851);

            var myOptions = {
                zoom: 18,
                center: new google.maps.LatLng(42.564613,-70.809087),
                // zoom: 5,
                // center: myLatlng,
                mapTypeId: google.maps.MapTypeId.ROADMAP
            };
            map = new google.maps.Map(document.getElementById("map_canvas"),
                  myOptions);

   geoXml = new geoXML3.parser({
                map: map,
                singleInfoWindow: true,
                afterParse: useTheData
            });
            geoXml.parse('ActivityStatus_Producing_labels.kml');
        };
function kmlClick(marker) {
  google.maps.event.trigger(geoXml.docs[0].markers[marker],"click");
}

function useTheData(doc){
  // Geodata handling goes here, using JSON properties of the doc object
 var sidebarHtml = "<table>";
 for (var i = 0; i < doc[0].markers.length; i++) {
 // console.log(doc[0].markers[i].title);
sidebarHtml += '<tr><td><a     href="javascript:kmlClick('+i+');">'+doc[0].placemarks[i].name+'</a></td></tr>';
  }

I am getting an error that doc[0].markers.length cannot get the length from a null or non existent variable depending on which browser I use.

In this website: http://thoughtfi.com/geoxmlpractice/practiceIMR2.html I can get it to run in Chrome but not IE

This website works in IE and Chrome and has almost the same code: http://www.geocodezip.com/geoxml3_test/v3_geoxml3_us_states_kml_test.html

How can I get my site to work? I’m guessing it’s not parsing the kml file in time or the server/browser is too slow to parse the kml?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-09T21:23:38+00:00Added an answer on June 9, 2026 at 9:23 pm

    It seems to be the kml file. IE doesn’t believe it is valid xml. Neither does feedvalidator:
    http://www.feedvalidator.org/check.cgi?url=http%3A%2F%2Fthoughtfi.com%2Fgeoxmlpractice%2FActivityStatus_Producing_labels.kml#l675

    If I fix the invalid xml (and the character encoding the xml file reports), it works for me:

    http://www.geocodezip.com/geoxml3_test/thoughtfi_com_geoxmlpractice_practiceIMR2a.html

    Here is another example displaying the “fixed” kml

    You can also see what Google Maps thinks of your kml:

    http://thoughtfi.com/geoxml… could not be displayed because it is not a valid KML or KMZ file.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I am having trouble with the following code: function Class() { var self =
Having trouble getting the following code to work: $('#changeMode').button().click(function(){ $('#playfield').toggle(function() { $(this).switchClass(gridView,plainView); }, function()
im having some trouble with the following code: Ext.define('...controller...', { extend: 'Ext.app.Controller', init: function()
I'm having trouble understanding jqueries .each. I have the following code: $('#testDiv').each(function(index, domEle){ $(this).text(index);
I'm developing a wall and I'm having trouble with the following code. As you
Having trouble with the following segment of code. I'm getting a parameter count mismatch.
Hello I'm having trouble with the following piece of code: <h:selectOneMenu id=selectTipoAutorizacion value=#{autorizacion.codigoTipoAutorizacion} required=true>
Okay, I am having trouble with the following piece of code (in a header
I'm having trouble with the following code. What it should do is echo cats.php
I've been having trouble converting the following fairly straight forward c# code into vb.net

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.