Locator.addressesToLocations - any examples? Do I need a paid license?

Discussion created by hubertlo on Oct 17, 2012
Latest reply on Oct 23, 2012 by hubertlo
Is there any example on how to make locator.addressesToLocations work? I found the reference to it here but I cannot get it to work.

I am using the North America geocode server:

Here are my 2 addresses:
2896 Acadia Rd, Vancouver, British Columbia, V6T 1S2, Canada
3400 Balaclava Street, Vancouver, British Columbia, V6L 2S6, Canada

Here is my code snippet. It never gets into the showBatchResults function.
locator = new esri.tasks.Locator("");
dojo.connect(locator, "onAddressesToLocationsComplete", showBatchResults)
var manyaddresses = [{"OBJECTID":0,"SingleLine":dojo.byId("address1").value},{"OBJECTID":1,"SingleLine":dojo.byId("address2").value}];
        locator.outSpatialReference= map.spatialReference;
        var options = {

function showBatchResults(candidates) { }

      <div id="leftPane" class="roundedCorners" dojotype="dijit.layout.ContentPane" region="left">
        Enter an input address and the application will use the sample address locator to return the location for 
        street addresses in the United States. 
        <br />
        <textarea type="text" id="address1"/>2896 Acadia Rd, Vancouver, British Columbia, V6T 1S2, Canada</textArea>
        <br />
        <textarea type="text" id="address2">3400 Balaclava Street, Vancouver, British Columbia, V6L 2S6, Canada</textarea>
        <br />
        <button dojotype="dijit.form.Button" onclick="locate()"> Locate</button> 

I have looked into the call using Fiddler2 and I get this:
User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:16.0) Gecko/20100101 Firefox/16.0
Accept: */*
Accept-Language: en-US,en;q=0.5
Accept-Encoding: gzip, deflate
Connection: keep-alive

The result is Error code 400. Details: "Invalid URL". Or this if I do it on the browser:
{"error":{"code":400,"message":"Unable to complete  operation.","details":["Invalid URL"]}}

What am I missing? My alternative is to call addressToLocation 1 address at a time.