Reputation: 5732
Currently, I have a google maps with two types of markers. One marker is the "main" marker. This marker has a circle around it.
The other type of markers behave like "children" of the main marker. They are inside the circle illustrating that these markers are inside the allowed area. The child markers send their geolocation (lat/long) through its GPS. There are cases when the devices don't have geolocation data. In this situation, I need to put then "out" of the circle.
I have an idea but I can't make it work. Since I have the circle, is there a way to put these markers at the right border of the circle?
I looked into the docs for the maps api, I managed getting the circle bounds property. I also tried using the getBounds().getNorthEast() But it places my marker to far from the circle and that's not what I want.
Upvotes: 1
Views: 958
Reputation: 161324
The bounds is rectangular. getNorthEast is the north eastern corner, you want the point on the center of the right edge, not the corner. Or use the computeOffset method of the geometry library
Upvotes: 2