Brandon
Brandon

Reputation: 2125

Setup an area of Google Maps for displaying markers

I have a full screen Google Map along with control divs overlaid on top.

-----------------------------------------------------
|         |                                         |
|         |                                         |
|         |             Map                         |
| Sidebar |                                         |
|         |                                         |
|         |                                         |
|         |=========================================|
|         |              Controls                   |
----------------------------------------------------|

The sidebar and controls at the bottom are able to slide in and out and there is usable map behind it. The problem is when I go to fit the bounds for a set of markers and center on the map, sometimes markers get put behind the sidebar and controls divs. I'm guessing because it is technically part of the map behind it.

Is there a way to have a full screen map but tell Google Maps that only part of the screen is considered "usable" for doing bounds and centering?

Upvotes: 1

Views: 105

Answers (1)

Th 00 mÄ s
Th 00 mÄ s

Reputation: 3826

There is no built in way to achieve what you want. Youll have to implement that yourself. Here is a post which will aid in calculation the latlng distance to pixels: Google Maps API 3: Calculating length of polygon in pixels

Upvotes: 1

Related Questions