jasand-pereza / react-geo-encode-component

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

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

##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

About

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

License:MIT License


Languages

Language:JavaScript 100.0%