Comments (9)
+1. I've been using react-async-script for loading googlemaps API and it worked fine before I updated to react-google-maps v2. I'm against adding a script tag to load googlemaps API, it's against reactjs's modular structure, so I think react-google-maps itself should provide a way to load googlemaps API or at least play well with 3rd party async script loaders.
from react-google-maps.
Thanks for the info of react-async-script
. I believe it's suitable for our usage. I will look at it soon.
from react-google-maps.
Hey! Any progress on this?
from react-google-maps.
How is this progressing?
from react-google-maps.
Okay. Right now I could add another async.html.js
endpoint to examples/gh-pages
to demonstrate async loaded scripts. Here's the current result:
Branch
Screenshot
The error in the web console shows that async loaded google.maps script will fail due to document.write
API.
Reason for that
We use react-async-script
to load the Google Map API v3. However, inside the code, the script.async
flag is set to 1
and cannot change by props. (REF: http://git.io/vCWHB).
11/16/2015 Update
Releases scriptjs
version and pending this branch. Update branch URL.
from react-google-maps.
Guys, I've added a new component called < ScriptjsGoogleMap />
using scriptjs
to load google maps API v3. The example can be seen on gh-pages
:
https://tomchentw.github.io/react-google-maps/async/
Please check it out and let me know any issues, thanks! You can use the version of 4.3.1
from react-google-maps.
Using the async script loading internally does not expose important constants like MapTypeId.TERRAIN to map parent component. It makes it unconvenient to set up the map.
Could the default options be set via callback that recieves the maps api reference after loading?
from react-google-maps.
@tstavinoha consider using the callback
query parameter in the query
props? This is the standard way by Google Maps JavaScript API v3 to handle the "loaded" event. Notice that it has to be a global variable.
from react-google-maps.
Close for now.
We're also looking for maintainers. Involve in #266 to help strengthen our community!
from react-google-maps.
Related Issues (20)
- how to add button re center on map HOT 1
- Problems while implementing Content Security Policy HOT 1
- Polygon not being drawn on the map HOT 1
- CWE-601 Security Vulnerability found in one of the transitive dependencies HOT 1
- Legacy context API has been detected within a strict-mode tree. HOT 1
- AutoComplete Default Value
- Check this use 'window'
- Error when installing HOT 3
- Could not resolve dependency: npm ERR! peer react@"^16 || ^17" from [email protected]
- Problem in Installation HOT 2
- I can not push custom control button to the map
- More than 700 re renderings HOT 1
- Is there any benefits to using MarkerClusterer, rather than simply using Markers?
- Best Way To Style Marker Labels?
- KMlLayer 2d, 3d kmz file or kml file highlighted layer not showing
- f.setPosition is not a function
- How can I get the DOM element for Marker?
- disable map zoom when DirectionsRenderer redraws the path
- Upgrade jQuery dependency inside scriptjs package. HOT 1
- Update needed?
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from react-google-maps.