gmap full working example

UI Components for React
Post Reply
trycatchthis
Posts: 2
Joined: 07 Jun 2021, 00:06

07 Jun 2021, 00:15

Is there a fully working example of Gmap with the entire source available (not just snippets or references to variables that should be defined else where)?

https://github.com/primefaces/primereac ... MapDemo.js
/*global google*/
What is global google? How specifically do I define it? Where should it be defined?

I get the following error:

Code: Select all

ReferenceError: google is not defined

trycatchthis
Posts: 2
Joined: 07 Jun 2021, 00:06

10 Jun 2021, 07:03

Get API_KEY from https://developers.google.com/maps/docu ... et-api-key

In my create react app index.html file.
<script type="text/javascript" src="https://maps.googleapis.com/maps/api/js ... ck=initMap" async defer></script>

Post Reply

Return to “PrimeReact”

  • Information
  • Who is online

    Users browsing this forum: No registered users and 17 guests