gschoon Posted September 28, 2016 Posted September 28, 2016 How can I start the GMap component in "Streetview" mode? Quote
Sherzod Posted September 29, 2016 Posted September 29, 2016 Hi, Firstly need to analyze this link: https://developers.google.com/maps/documentation/javascript/streetview 1. Open this demo "..\FMSoft\Framework\uniGUI\Demos\Desktop\GoogleMaps" 2. For now "static" example: procedure TMainForm.SetCoord(Lat, Long : Real); begin if WebMode then UniSession.AddJS('var gm=googleMap;if (typeof gm=="object") {gm.setCenter(new google.maps.LatLng('+ StringReplace(Format('%2.4f', [Lat]), ',', '.', [rfReplaceAll])+','+ StringReplace(Format('%2.4f', [Long]), ',', '.', [rfReplaceAll])+ ')); gm.setZoom(8);'+ 'var panorama = new google.maps.StreetViewPanorama('+ 'document.getElementById("pano"), {'+ 'position: {lat: 42.345573, lng: -71.098326},'+ 'pov: {'+ 'heading: 34,'+ 'pitch: 10'+ '}'+ '});'+ 'gm.setStreetView(panorama);'+ '}'); end; 3. UniHTMLFrame2.HTML: <div id="pano" style="width: 100%; height: 100%"> </div> Result: Best regards. Quote
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.