Midgard wrote: > I can't do this. Because map is dynamic. setCenter is variable for me. > It's will change from another form elements.
As marcelo often points out, you can do anything. I don't know your constraints. You can certainly save the information you need to call setCenter or recalculate it based on your "another form elements", then use that information. There may be another solution, such as calculating the size of the map div and providing it to the GMap2 constructor. That will take some work as your map is defined as a percentage and I don't know whether or not it will work. Good Luck, Larry > And checkResize() doesn't > change anything. > > Thanks > > On 1 Eyl�l, 04:48, "[EMAIL PROTECTED]" <[EMAIL PROTECTED]> > wrote: > > Midgard wrote: > > > Hi, > > > > > Please look this page: > > > > >http://www.eggdrop.gen.tr/iletisim > > > > > Click to: "yada Haritaya Bak n!?" > > > > > Map will showing, but marker or setCenter not true. > > > > You seem to have a case where not only do you need to call > > map.checkResize(); but you also need to call map.setCenter(...) again > > as well. > > > > onclick="expandHarita(); map.setCenter(new GLatLng(41.06696817482006, > > 28.995752334594726), 18); return false;" > > > > (or put them inside your expandHarita function. �Note: you will also > > need to make your map variable global). > > > > � -- Larry > > > > > > > > > > > > > On Sep 1, 1:32 am, "[EMAIL PROTECTED]" <[EMAIL PROTECTED]> > > > wrote: > > > > Midgard wrote: > > > > > Hi, > > > > > > > I've this code: > > > > > > > ... > > > > > <script> > > > > > function showMap() { > > > > > document.getElementById('mapWrapper').style.display = 'block'; > > > > > } > > > > > </script> > > > > > > > <divid="mapWrapper" style="display: none;"> > > > > > > > <divid="map" style="width: 400px; height: 300px;"></div> > > > > > > > </div> > > > > > > > <input type="button" onclick="showMap();" value="Show map!"> > > > > > ... > > > > > > > I've clicked the 'Show map!' button; and map is loaded but setCenter > > > > > doesn't work. It's moving to another location (20-30px) > > > > > > > Why? > > > > > > Can't really tell from the information provided in your post. A > > > > couple of guesses: probably because you didn't call map.checkResize() > > > > after changing its size or you didn't set the optional size for the > > > > map. > > > > > > Please don't post code. What you posted is not enough to diagnose > > > > your problem. Post a link to your map that shows the problem.- Hide > > > > quoted text - > > > > > > - Show quoted text -- Al�nt�y� gizle - > > > > - Al�nt�y� g�ster - --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Google Maps API" group. To post to this group, send email to [email protected] To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/Google-Maps-API?hl=en -~----------~----~----~----~------~----~------~--~---
