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%


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?

permanent link

answered 20 Apr '12, 15:19

Lanyon's gravatar image

Lanyon
56114
accept rate: 0%

Your answer
toggle preview

Follow this question

By Email:

Once you sign in you will be able to subscribe for any updates here

By RSS:

Answers

Answers and Comments

Markdown Basics

  • *italic* or _italic_
  • **bold** or __bold__
  • link:[text](http://url.com/ "title")
  • image?![alt text](/path/img.jpg "title")
  • numbered list: 1. Foo 2. Bar
  • to add a line break simply add two spaces to where you would like the new line to be.
  • basic HTML tags are also supported

Question tags:

×237
×46
×34
×33
×1

question asked: 27 Oct '11, 09:59

question was seen: 3,701 times

last updated: 20 Apr '12, 15:19

powered by OSQA