This is a static archive of our old OpenStreetMap Help Site. Please post any new questions and answers at community.osm.org.

Problem using OSM data with Google Maps API V3

0

I'm using the method which is described here to add OSM data to an application which uses various mapping APIs, including Google Maps V2 and V3.

The code supplied works perfectly with the Google Maps API V2. However, with V3 (I'm using the first V3 example, which is the second example on the page since there is one V2 example before it), although the OSM tiles load correctly, I no longer see the Google Maps scale controls ("drag to zoom").

The issue seems to be caused by this call:

map.setMapTypeId('OpenStreetMap');

If I comment that out, the scale controls appear, and work. Is there any reason why this call is necessary? Everything else seems to work, at first glance.

asked 27 Oct '11, 09:59

sTeamTraen's gravatar image

sTeamTraen
1111
accept rate: 0%


One Answer:

0

Are you still using your Google V3 api format with this code commented out? Would you be willing to discuss the switch complexity, or not, with me?

answered 20 Apr '12, 15:19

Lanyon's gravatar image

Lanyon
56114
accept rate: 0%

Source code available on GitHub .