Skip to content

How do I add GeoJson? #2425

Answered by Prateek138
Prateek138 asked this question in Q&A
Discussion options

You must be logged in to vote

If anyone else need this, it returns a map object on onLoad.

Try this:

onLoad={(map) => console.log(map)}

<GoogleMap 
	mapContainerStyle={mapContainerStyle} 
	zoom={8} 
	center={center} 
	options={options}
	onClick={onMapClick}
	onLoad={(map) => console.log(map)} //map is the map refrence. Use it to add geojsons using loadGeoJson, etc...
>

Replies: 1 comment

Comment options

You must be logged in to vote
0 replies
Answer selected by Prateek138
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
1 participant