If this is your first visit, be sure to
check out the FAQ by clicking the
link above. You may have to register
before you can post: click the register link above to proceed. To start viewing messages,
select the forum that you want to visit from the selection below.

google map marker issues via Json and PHP

Am building a Google maps which gets information from database via JSON and php. Everything works fine. Now,

I want to replace Google red Marker icon with my own icon image in a database. how can i achieve that.

In my database i have 3 insert statements
Insert into into app values ('mutago','my name is mutago','images/icon1.png');
Insert into into app values ('mutago1','my name is mutago1','images/icon2.png');
Insert into into app values ('mutago2','my name is mutago2','images/icon3.png');

My question is how can i replace google marker with this icon1.png,icon2.png,icon3.png and use the as my maker.
Below is the entire code in JS.

my first question has been resolved. One more thing, I want to replace the dropdown select option with input type eg.. <input type=text> so that users can ignore dropdown database destination retrieval and hen manually typing the destination and then click on Get Direction Button . This issues lies here

Of course, you would want to make only one "selected".....(see below).

Hope this helps.

Else, if you want to replace only some, you should know that the options/value pairs are stored in an array, so you could manipulate only one or several by referring to that element (number), as in:

Code:

$(#destination)=myDropdown;
myDropdown.options[number] = new Option("new_value", "some text");
myDropdown.options[number].selected = "true"; // or false, depending on if you want it selected or not. Default is false.

If you want to leave the first one and add the balance, then you can say:

Code:

$('#destination').find('option:not(:first)').remove();

This is done from memory, so I hope this will point you in the right direction.....