title: Using containsLocation with a google.maps.Data.polygon
body: <p>I have a google.maps.Data layer with a polygon feature:</p>
  
  <pre><code>state = new google.maps.Data();
  state.loadGeoJson('static/geojson/ga_state.geojson', {
      idPropertyName: 'name'
  });
  state.setStyle({
      clickable: false,
      visible: false,
  });
  state.setMap(map);
  </code></pre>
  
  <p>Within this feature collection is a polygon representing the state of Georgia:</p>
  
  <pre><code>ga = state.getFeatureById('Georgia')
  </code></pre>
  
  <p>I can get the geometry of this feature:</p>
  
  <pre><code>gaGeom = ga.getGeometry()
  </code></pre>
  
  <p>But when I pass either of these objects and also the raw array to google.maps.geometry.polygon.containsFeature(), I get an error that the object does not contain the get() fuction:</p>
  
  <pre><code>google.maps.geometry.poly.containsLocation(p.getPosition(), ga)
  Uncaught TypeError: b.get is not a function(…)
  
  google.maps.geometry.poly.containsLocation(p.getPosition(), gaGeom)
  Uncaught TypeError: b.get is not a function(…)
  
  google.maps.geometry.poly.containsLocation(p.getPosition(), gaGeom.getArray())
  Uncaught TypeError: b.get is not a function(…)
  </code></pre>
  
  <p>How can I get a google.maps.Data.Polygon to either convert to a google.maps.Polygon or to work with this function?</p>
  
  <p><strong>EDIT:</strong></p>
  
  <p>I have found a way to construct a google.maps.Polygon from a google.maps.Data.Polygon as:</p>
  
  <pre><code>//gaGeom is the feature.geometry from the data layer
  poly = new google.maps.Polygon({paths:gaGeom.getAt(0).getArray()})
  </code></pre>
  
  <p>But surely there has to be a cleaner way to construct the google.maps.Polygon?</p>