Kubas
Kubas

Reputation: 1028

Google maps API geocode - additional parameter

I have

var marker  = geo.geocode({address: adr}, geoc);

where

function geoc(results, status) {...

I want to set additional parameter to the function geoc but I do not know how to call geoc with three parameters. How to do it, please help, I'am noob in JS :D

Upvotes: 0

Views: 109

Answers (1)

antyrat
antyrat

Reputation: 27765

Try to use anonymously function for that:

var marker  = geo.geocode({address: adr}, function(results, status) {
    geoc(results, status, thirdParam);
});

And in your geoc function:

function geoc(results, status, someParam) {...

Upvotes: 2

Related Questions