On Sep 15, 1:59 pm, ksaylor <[email protected]> wrote: > I have been playing around with v3 and I am trying something that > should be fairly simple, but doesn't seem to work as expected. I have > a marker that I get its position from an XML file. I use setTimeout() > to periodically check the file and update the position of the marker > if the position has changed in the file. The first time the position > is read from the file a new marker is created using the following > code: > > myLatlng = new google.maps.LatLng(my_lat, my_lon); > mymarker = new google.maps.Marker({ > position: myLatlng, > title: "My position"}); > mymarker.setMap(map); > > This works just fine. The marker shows up on the map and there is much > rejoicing. There is some logic in the javascript that sees if the > position has changed, if it has, the following code is used: > > mymarker.setPosition(myLatLong);
Here's my mistake ^^^^. I used the wrong variable name. Ugh! Sorry for wasting anyone's time. > > This is where things break. I've used javascript alert() for debugging > purposes and I see that the setPosition() is called, but it never > returns. That's it. It just stops there. Nothing beyond that point > changes. > > Just for the sake of clarity, mymarker is a "global" variable that is > initally set to null. I appreciate any help that someone my be able to > provide. > > -Kase -- You received this message because you are subscribed to the Google Groups "Google Maps JavaScript API v3" group. To post to this group, send email to [email protected]. To unsubscribe from this group, send email to [email protected]. For more options, visit this group at http://groups.google.com/group/google-maps-js-api-v3?hl=en.
