• Garmin Insider

Web Drop

This method supports converting an address to a waypoint and saving it to a connected device.

writeAddressToDevice

Parameters

address
String – an address to be geocoded to a waypoint.

Example Request

This example geocodes an address and saves it to the first connected device found.

var WebDrop = Class.create();
WebDrop.prototype = {
    initialize: function() {
	this.garminController = new Garmin.DeviceControl();
	this.garminController.register(this);
	this.garminController.unlock("http://localhost/", "");
	this.garminController.findDevices();
    },
    onFinishFindDevices: function(json) {
       	this.garminController.writeAddressToDevice("180 Harbor Drive, 94965");
    },
    onFinishedFindLatLon: function(json) {
        alert("Successfully located " + json.waypoint);
    },
    onFinishWriteToDevice: function(json) {
        alert("Saved to device favorites list");
    },
    onException: function(json) {
	    alert("Exception: " + json.msg.message);
    }
};

Developer Resources