senters Posted April 13, 2012 Report Share Posted April 13, 2012 (edited) Izmantoju Google Maps API v3 eventu attēlošanai LV kartē. Vajag dabūt precīzu LV kartes izmēru uz 1004px platuma, lai ietilptu precīzi pilnā lapas platumā visa teritorija. Diemžēl zoom parametrs 7 ir par mazu (http://screencast.com/t/EpWvcUrikRlZ), 8 - par lielu (http://screencast.com/t/M39AduFjrga) JS konfigs: // Google Maps API v.3 var map; function initialize() { var myOptions = { zoom: 8, center: new google.maps.LatLng(56.879635,24.603189), // Latvija mapTypeId: google.maps.MapTypeId.ROADMAP }; map = new google.maps.Map(document.getElementById('cities-map'), myOptions); } google.maps.event.addDomListener(window, 'load', initialize); Cik skatos te (https://developers.g...script/tutorial) nekur nav teikts, kā varētu pielāgot karti lai tā precīzi ietilptu konkrētos izmēros (px). Edited April 13, 2012 by senters Quote Link to comment Share on other sites More sharing options...
webi Posted April 14, 2012 Report Share Posted April 14, 2012 (edited) Precīzi nedabūsi, jo karte sastāv no attēliem, kas ir konstanti katram zoom levelim. Edited April 14, 2012 by webi Quote Link to comment Share on other sites More sharing options...
indoom Posted April 16, 2012 Report Share Posted April 16, 2012 http://stackoverflow.com/questions/6086326/how-to-center-a-google-map-around-a-country-if-you-just-have-the-country-name Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.