I use a react-google-maps and I want to dynamically highlight a country or a subntaional when user click on the map anywhere in the whole world, so I need to get coordinates to draw a polygon, but can't find any service with api for it. What the best way to achieve this?
react-google-maps: dynamically highlight a country or a subntaional
390 Views Asked by Gross At
2
There are 2 best solutions below
0
cocoa
On
Please use this API.
https://nominatim.openstreetmap.org/search.php?q=US&polygon_geojson=1&format=json
It will return multiPolygon array.
Related Questions in REACTJS
- ussd reader in Recket Native module
- Teams tab application returns SSO error in mobile Outlook
- Github Pages Deployment deploys a blank page
- Is there any way to glow this bulb image like a real light bulb
- Optimize LCP ReactJs
- Page in React only renders elements after refreshing
- Unable to Post Form Data to MongoDB because of picturepath
- MERN Stack App - User Avatar Upload - 500 Error After Deployment on Render
- Hooks are not supported inside an async component error in nextjs project using useQuery
- How to change the Font Weight of a SelectValue component in React when a SelectItem is selected?
- On the server side, it returns undefined but on the client side, logs the values no problem
- Multilevel dropdown with checkboxes in Select component
- TypeScript Error only on big type only when assigned to a variable
- Deployment through app engine, cloud sql database, problem connecting with server code, doesn't connect
- Data is not filtering in props. Showing passdata.map is not a function
Related Questions in GOOGLE-MAPS
- Uncaught TypeError: google.maps.LatLng is not a constructor at init (script.js:7:13)
- MarkerInfoWindow doesn't hold the clicked marker position after list refresh in Compose Map
- The Polyline is not showing in flutter but the directions api is enabled and the current position is not updating
- Unsure what imports to use for Advanced Marker Element
- The problem is that it takes a long time to index web pages in emdadrodbar.ir?
- distance matrix api gives incorrect data
- How to display google maps in dark mode in a .NET MAUI (Android) app
- Couldn't import Google Map API
- google maps api - how to get location information /place_id from shareable links maps.goo.gl
- 'map-advanced-marker' component not found after upgrading @angular/google-maps
- How to Filter bus stops between Start and Stop BUS STOP?
- How to make pressing on marker fill in the textViews
- Google api nearbysearch how to filter data business_status
- Embedded google map throws net::ERR_BLOCKED_BY_CLIENT in chromium(Brave) browser
- Why the code shows only the header and footer of xml file?
Related Questions in GEOJSON
- Population All Scrambled - -Python - Matplotlib - Mapping
- leaflet polyline, how to add a property to the point?
- GeoJSON MultiPolygon Inversion Works for All Federal Districts of Russia Except Siberia in D3.js Map
- Styling a mapbox 3d buildings layer with external GeoJSON file
- incorrect header check while implementing GZIP in spring boot REST APIs
- Issues (New) When Adding Layers to Mapbox
- View Geojson on flutter_map
- Which mode to use edit existing deck.gl polygons using nebula.gl?
- Type Error : list indices must be integers or slices, not str
- how to detect door in floor plan image file using emgu.cv in C#
- d3-geo: Is there a way to not show the division between territories spanning 180/-180 degrees of longitude?
- Displaying geojson data sent by flask server in folium map
- GeoJSON loaded but not displaying in MapBox GL JS
- geoJson parse issue
- XSLT embed json in a HTML
Related Questions in TOPOGRAPHY
- How to get Topographical Position Index (Tpi) to fill to edges r spatialEco
- How to make colorbar in geopandas?
- Retrieving aspect/sun exposition of geographic locations using code (e.g. python, commandline, ...)
- whitebox:wbt_hillshade Why are values not between 0 and 255 in R?
- Calculate Topographic Position Index for coordinates stored in a dataframe in R
- Is there a crate that can read insanely large png files quickly with no data loss. (17mb files with 21600 x 10800)
- ReactJS mui/material Topography value error
- How to convert Cartopy tiles in gray scale (2022)
- How to find the best translation available to match two sets of related points that do not exactly match?
- How to change background and outline color on topographic map?
- react-google-maps: dynamically highlight a country or a subntaional
- Looking for a way to capture elevation and location data from a device to create a topographical map or model
- Add high-resolution bottom topography to Cartopy map
- topography data, string '-' can't be converted to float
- How to create Topographic 3d graphs in r?
Trending Questions
- UIImageView Frame Doesn't Reflect Constraints
- Is it possible to use adb commands to click on a view by finding its ID?
- How to create a new web character symbol recognizable by html/javascript?
- Why isn't my CSS3 animation smooth in Google Chrome (but very smooth on other browsers)?
- Heap Gives Page Fault
- Connect ffmpeg to Visual Studio 2008
- Both Object- and ValueAnimator jumps when Duration is set above API LvL 24
- How to avoid default initialization of objects in std::vector?
- second argument of the command line arguments in a format other than char** argv or char* argv[]
- How to improve efficiency of algorithm which generates next lexicographic permutation?
- Navigating to the another actvity app getting crash in android
- How to read the particular message format in android and store in sqlite database?
- Resetting inventory status after order is cancelled
- Efficiently compute powers of X in SSE/AVX
- Insert into an external database using ajax and php : POST 500 (Internal Server Error)
Popular Questions
- How do I undo the most recent local commits in Git?
- How can I remove a specific item from an array in JavaScript?
- How do I delete a Git branch locally and remotely?
- Find all files containing a specific text (string) on Linux?
- How do I revert a Git repository to a previous commit?
- How do I create an HTML button that acts like a link?
- How do I check out a remote Git branch?
- How do I force "git pull" to overwrite local files?
- How do I list all files of a directory?
- How to check whether a string contains a substring in JavaScript?
- How do I redirect to another webpage?
- How can I iterate over rows in a Pandas DataFrame?
- How do I convert a String to an int in Java?
- Does Python have a string 'contains' substring method?
- How do I check if a string contains a specific word?
I was also searching for this solution. you can use google charts api for above problem.