sudfunk / jquery-ui-map

Automatically exported from code.google.com/p/jquery-ui-map
0 stars 0 forks source link

Setting map option makes the map have 'map' type id, even if set to 'satellite' #14

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?
1. Load the attached map (www/index.html)
2. Change map type to satellite using inset google controls
3. Click map to add marker (means that 'center' option is called before marker 
stuff happens)
4. The map changes to 'map' type again

What is the expected output? What do you see instead?

Map should stay as satellite type.

Original issue reported on code.google.com by libby.ba...@gmail.com on 21 Jun 2011 at 4:40

Attachments:

GoogleCodeExporter commented 9 years ago
Whenever you set the options, eg $('#map_canvas').gmap('option', 'center', 
marker.getPosition()); it will refresh all options and thus loosing it's state 
(because currently its just the map holding the state). 

You can fix temporarily, until a patch is up with e.g. 
$('#map_canvas').gmap('getMap').setCenter(marker.getPosition());

Original comment by johansalllarsson on 21 Jun 2011 at 8:13

GoogleCodeExporter commented 9 years ago
Fixed in trunk

Original comment by johansalllarsson on 21 Jun 2011 at 9:31