apneadiving/Google-Maps-for-Rails — pull request #337 by steveo7 (2013-04-25 20:32:34+00:00)
Title: Added support for Marker With Label library

Added support for the `markerWIthLabel` library from Google Maps Utility Library V3. See this link for a reference. http://google-maps-utility-library-v3.googlecode.com/svn/tags/markerwithlabel/1.1.8/docs/reference.html

I added access to `labelContent` and `labelClass` marker properties to set from controller code like so;

@json = User.all.to_gmaps4rails do |user, marker|
marker.title("My title")
marker.labelContent("this is on the label")
marker.json({labelClass: "user_marker_labels"})
end

You can add other markerWithLabel properties from a view using the raw option like so;

gmaps(map_options: {...}, markers: {data: @json, options: { ...},
raw: '{labelStyle: {opacity: 0.75}, labelAnchor: new google.maps.Point(22, 0)}'}})