adding number/letter markers in google maps api

Got a LiveCode personal license? Are you a beginner, hobbyist or educator that's new to LiveCode? This forum is the place to go for help getting started. Welcome!

Moderators: FourthWorld, heatherlaine, Klaus, kevinmiller

Post Reply
Bellballer1
Posts: 40
Joined: Sat Oct 24, 2015 5:42 pm

adding number/letter markers in google maps api

Post by Bellballer1 » Wed Feb 17, 2016 11:54 pm

Hello all!
I have searched the forum for an answer to my question, but haven't found the appropriate message board.

I am using the google maps api in my app. I want to have multiple markers, each with different labels (e.g. each marker labeled A to Q). I want each unique lettered marker to display when the user inputs an address. So far I can do this with one marker (displaying the letter "A") but I am not sure how to do this so that multiple lettered markers appear on the map. This is my code so far:

put "var " & pName & " = new google.maps.Marker({" & return into tMarkerCode
put "icon: 'https://chart.googleapis.com/chart?chst ... tter&chld= A|FE6256|000000|'," & return after tMarkerCode
put "var labels: " = 'ABCDEFGHIJKLMNOPQ' & return after tMarkerCode
put "var labelIndex: " = 0 & return after tMarkerCode
--put "var image = new google.maps.MarkerLabel(" & sMarkerCount, ")" & return after tMarkerCode
put "position: new google.maps.LatLng(" & sMarkers[pName]["pos"] & ")," & return after tMarkerCode
put "map: map," & return after tMarkerCode
put "title:'" & sMarkers[pName]["title"] & "'" & return after tMarkerCode
put "});"& return after tMarkerCode

Can someone please explain how I can have multiple lettered markers appear on the map? Thanks. The code above is the result of trial & error. I know I am missing a simple step in my coding.

Post Reply