I am using the google maps api in my React project
How can I hide the markers cluster when there is not markers inside ? I've tried with clearMarkers() but does not work.
I suggest you take a look on this question, it is similar to yours. Here
you can try setting it to null
markers[i].setMap(null);
Related
I'm using #googlemaps/react-wrapper for my google map implementation. I faced an issue with showing the google map. I had double-checked my API restriction and I found out this is the issue in the library.
{Maybe the way I implemented was wrong and affected the render or something}
So I did try using the traditional way to have in the index.html, and the map was successfully shown on my page. What actually the problems here?
CODESANDBOX LINK
I have a problem, I am already developing an application with react js using mapbox, my problem is what I want to draw routes in the map from a given position. How do I do it?
Here you have few great source how to do it:
Add a line to a map using a GeoJSON source
Animate a point along a route
Support for drawing and editing features on mapbox-gl.js maps.
Good Luck ;-)
I want to implement interactive svg in Angular Js application. Here is a glimpse of Svg which I will be using. I Know how to use an Svg in angular but the purpose of this question is not this. I want to make it dynamic. Like when I click "Punjab", the svg zooms in and show me regions, and upon clicking a specific region , it shows me the data which i will be getting through backend. So I am just curious, is this even possible ?
Based on your requirement you can use google map which can be easily integrated with Angular. Also I suggest to check D3.js.
Its Javascript library for creating SVG dynamically and can be easily integrated via Angular directives. There are plenty of examples available for the same.
I have tried to do google map with marking using 'google-map-react' but marking places in map is not working.I need to mark places dynamically on page load .
I have referenced this URL https://github.com/istarkov/google-map-react
Please Provide a solution as a sample code or provide any reference url.I am hoping to hear from more experienced React developers.
Thanks
I have used google's polymer to make web components but i am also very interested in giving react a try. So i want to know whether it is possible to use the polymer component from inside the render function of a react component ?
Yes it is possible !
I did it using a method thats kinda bit complicated but i would love to share it.
if you have already used polymer then just directly use the polymer the way you use it any other polymer element.
all you have to do is convert this react folder to a js.
You can follow this tutorial in order to convert a jsx to js. and use any polymer element without a problem.
https://www.youtube.com/watch?v=4WUATF3hGUQ
This is not my tutorial but something i saw on youtube .
all credits for this tutorial go to codingwithjesse
As asked by WiredPraire , i would like to show you with an example
this is my index.html :
This is poly-react.html the polymer element:
This is my polyreact.jsx which also has polymer element inside
and the polymer inside above jsx started working with this transformation which can be done using the tutorial:
The index file also has to be changed like this:
hope this helps!!!!!!!!