×

Discussion Board

Results 1 to 2 of 2
  1. #1
    Registered User
    Join Date
    Feb 2010
    Posts
    20

    Smile displaying device dynamically in google maps

    I have a Java ME application installed on a nokia s60 that updates a MySQL database as to the devices location every 30 seconds.
    I can display the route followed by the device in google maps on a webpage
    by using a combination of javascript and xml.
    http://www.blossompark.net/v3/dispatcher2.htm

    What I want to do now is display the location in real time. That is get the webpage to ubdate dynamically from the location table and clear the previous marker each time it updates the web page
    I think i will need to modify the javascript
    Code:
    GDownloadUrl("phpsqlajax_genxmlDOD.php", function(data) {
              var xml = GXml.parse(data);
              var markers = xml.documentElement.getElementsByTagName("marker");
              for (var i = 0; i < markers.length; i++) {
                var TDLN = markers[i].getAttribute("TDLN");
               // var address = markers[i].getAttribute("address");
                //var user_type = markers[i].getAttribute("user_type");
                var point = new GLatLng(parseFloat(markers[i].getAttribute("lat")),
                                        parseFloat(markers[i].getAttribute("lng")));
                var status = markers[i].getAttribute("status");
                var LatestLocUpdate = markers[i].getAttribute("LatestLocUpdate");
                var marker = createMarker(point,status, TDLN,LatestLocUpdate ) ;
                map.addOverlay(marker);
              }
    to delete the marker before each iteration and introduce some sort of delay to delay the page update?

    Also I'm thinking of modifying the phpsqlajax_genxmlDOD.php file which queries the database and currently selects all items from the relevant table and change this to select the latest entry,
    // Select all the rows in the markers table

    PHP Code:
    $query "SELECT * FROM DriversOnDuty WHERE 1";
    $result mysql_query($query);
    if (!
    $result) {  
      die(
    'Invalid query: ' mysql_error());

    Would greatly appreciate advice in this ...
    thanks

  2. #2
    Super Contributor
    Join Date
    Apr 2007
    Posts
    2,708

    Re: displaying device dynamically in google maps

    sorry but javascript is no java so this isn't the right forum for that...
    same goes for php...
    Note: please don't send private questions to me, as I don't have time to provide private support. All such questions should be posted on public forums, where I and others can see and answer them.

Similar Threads

  1. Nokia maps and Google maps
    By MTi in forum Symbian
    Replies: 10
    Last Post: 2011-12-08, 13:23
  2. API for edit our own information in google maps in Mobile Device
    By chatrapati.nokia.santhosh in forum Mobile Java General
    Replies: 1
    Last Post: 2009-09-28, 09:05
  3. Replies: 5
    Last Post: 2008-09-26, 15:21

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
×