I am adding a polygon upon page load using something similar to this:
basic_map_options = {
mapTypeControl: true,
detect_location: false,
center_on_user: true,
auto_adjust: false,
libraries: ["drawing"]
}
map_view = {map_options: basic_map_options}
polygon_options = {
editable: true,
clickable: true
}
# points are expected in an array of arrays since technically it can handle multiple polygons
# but we are only using a single polygon
poly_json = [points_array]
polygons = {
polygons: { data: poly_json.to_json, options: polygon_options }
}
map_view = map_view.merge(polygons)
gmaps(map_view)
I am adding a polygon upon page load using something similar to this:
The polygon is drawn fine but it is not editable.