Skip to content

Commit

Permalink
TW-175 google_maps_controller progress.
Browse files Browse the repository at this point in the history
  • Loading branch information
TuckerJD committed Mar 11, 2015
1 parent a14e591 commit ab3112c
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 1 deletion.
2 changes: 1 addition & 1 deletion app/assets/javascripts/mapDraw.js
Original file line number Diff line number Diff line change
Expand Up @@ -100,7 +100,7 @@ function initializeDrawItem(map_canvas, fgdata) {
geometry.push('[' + coordinates[i].lng().toString() + ', ' + coordinates[i].lat().toString() + ']');
}
if (overlayType == 'Polygon') {
geometry.push('[' + coordinates[0].lng().toString() + ', ' + coordinates[0].lat().toString() + ']');
geometry.push('[[' + coordinates[0].lng().toString() + ', ' + coordinates[0].lat().toString() + ']]');
}
feature.push({
"type": "Feature",
Expand Down
2 changes: 2 additions & 0 deletions app/models/geographic_item.rb
Original file line number Diff line number Diff line change
Expand Up @@ -569,6 +569,8 @@ def to_geo_json_feature
# see subclasses, perhaps not tested
# end

# '{"type":"Feature","geometry":{"type":"Point","coordinates":[2.5,4.0]},"properties":{"color":"red"}}'
# '{"type":"Feature","geometry":{"type":"Polygon","coordinates":"[[[-125.29394388198853, 48.584480409793],[-67.11035013198853, 45.09937589848195],[-80.64550638198853, 25.01924647619111],[-117.55956888198853, 32.5591595028449],[-125.29394388198853, 48.584480409793]]]"},"properties":{}}'
# @param [String] value
def shape=(value)
geom = RGeo::GeoJSON.decode(value, :json_parser => :json)
Expand Down

0 comments on commit ab3112c

Please sign in to comment.