/react-geo-encode-component

React component for converting street addresses to lat/lng using the Google Geo Encoding API

Primary LanguageJavaScriptMIT LicenseMIT

##Example - using jQuery

(function($){
  'use strict';
  let $elements = $('.geocoding-component-container');
  if(!$elements.length) return;
  // for multiple components on a page
  $elements.each(function(){
    ReactDOM.render(
      <GeocodingComponent
        google_api_key = '{{GOOGLE_API_KEY}}'
        db_value={$(this).val()}
        field_name={$(this).attr('name')} />,
      $(this).parent()[0]
    );
  });
})(jQuery);

Screenshot of component