Welcome Guest, Not a member yet? Register   Sign In
google map app help
#1

[eluser]boony[/eluser]
Hi all,

I've got a small problem with a google map app that I'm working with and hope someone can help solve this issue.

Essentially, I've got a small app that places a marker on a map and then needs to save the lat and long of the position. The code supplied by GOOGLE (below) uses a JavaScript solution. The phpsqlinfo_addrow.php file gets the URI segments which pass the lat and long in the URL call.

Code:
function saveData() {
      var name = escape(document.getElementById("name").value);
      var address = escape(document.getElementById("address").value);
      var type = document.getElementById("type").value;
      var latlng = marker.getPosition();

      var url = "phpsqlinfo_addrow.php?name=" + name + "&address;=" + address +
                "&type;=" + type + "⪫=" + latlng.lat() + "&lng;=" + latlng.lng();
      downloadUrl(url, function(data, responseCode) {
        if (responseCode == 200 && data.length <= 1) {
          infowindow.close();
          document.getElementById("message")[removed] = "Location added.";
        }
      });
    }

What I want to do is get the lat and long from the marker and pass it to my controller to store the lat and long into the appropriate table. In other words I want to rewrite the following
Code:
var url = "phpsqlinfo_addrow.php?name=" + name + "&address;=" + address +
                "&type;=" + type + "&lat;=" + latlng.lat() + "&lng;=" + latlng.lng();

into something that CI can handle.

Any advice (well not exactly any advice %-P ) greatly appreciated.

Regards


Messages In This Thread
google map app help - by El Forum - 09-29-2009, 04:05 AM
google map app help - by El Forum - 09-29-2009, 05:13 AM
google map app help - by El Forum - 09-29-2009, 11:54 PM
google map app help - by El Forum - 09-30-2009, 06:34 AM



Theme © iAndrew 2016 - Forum software by © MyBB