I have a remoting method called from a controller which is given below
@RemoteAction
public static PageReference openLocatorPage(String addressId){
Address__c addr = [SELECT Id, Name, Latitude__c, Longitude__c FROM Address__c WHERE Id = :addressId];
Decimal latitude = addr.Latitude__c;
Decimal longitude = addr.Longitude__c;
String urlLocatorPage = '/apex/LeadLocator?lat='+latitude+'&lon='+longitude;
PageReference pr = new PageReference(urlLocatorPage);
return pr;
}
and my code in javascript using this controller is
LeadLocatorPreProcessorControllerV2.openLocatorPage($scope.CustomerSite.AddressID,function(results,event){
console.log(results);
//window.open(results,"_self");
});
Now the problem I am facing is that my url should be
/apex/LeadLocator?lat=1234&lon=1234
but instead my URL comes out to be
/apex/LeadLocator?lat=1234&lon=1234
any help regarding this amp; being appended to my URl would be appreciated.
thanks