On Feb 25, 11:15 am, Chris Moody <[email protected]> wrote:
> Unfortunately I've tried that, and whilst it doesn't totally break the
> map, it causes the markers to not show any info window at all?!
Yes, I get an error (didn't you?) of "score is not defined", which
isn't surprising as your marker function is defined:
function createMarker(point,text,value) {
which is different from what you posted earlier:
function createMarker(point,text,value,score) {
When you create a marker, you need to make sure that everything you
need is passed to the function AND accepted by it.
Your "process" function calls createMarker:
var marker = createMarker(lastmarker.getPoint(),["Value: "+values+".
Score: "+score+"."],values);
which doesn't match the function definition as square brackets create
an array -- containing a single element of a string. However, keeping
your function definition with its three arguments will probably do.
I reckon you need to alter the createMarker call above to
var marker = createMarker(lastmarker.getPoint(),"Value: "+values+".
Score: "+score+".",values);
(that's all on one line; take out the square brackets) and keep your
function definition with three arguments to match:
function createMarker(point,text,value) {
and, in that function, put the string you pass into the infoWindow:
marker.openInfoWindow(test);
None of that has been tested though.
--
You received this message because you are subscribed to the Google Groups
"Google Maps API" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to
[email protected].
For more options, visit this group at
http://groups.google.com/group/google-maps-api?hl=en.