Click here to Skip to main content
15,891,910 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
Hello friends,

I am very new for google maps. I am creating an application using google map. I want to show my custom map over it. So I used image overlay and set it's bounds. Image is showing ok. but problem is this I want to show only my custom map, but not area other that custom map. means I want to fix the visible area on map to the bounds of my custom image how can I do this. please help me

imageBounds are:
var imageBounds = new google.maps.LatLngBounds(
        new google.maps.LatLng(40.716216,-74.213393),
        new google.maps.LatLng(40.765641,-74.139235)
    );

Thanks in advance.
Posted
Updated 6-Dec-10 22:57pm
v2

1 solution

Unless the area that you're trying to lay an image over maps to the same size as the tiles for the zoom level you're at, you're out of luck.

You might be able to use a PNG image as a frame and place it with CSS to 'mask' out the areas you don't like (but I'm not fully sure if this is in adherence with the Google terms of use...check that out first).

Your other option would be to create an image bigger than the area revealed at the zoom level you're viewing.

Cheers.
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900