I would be very interested in being able to implement this as an action within a popup in version 4.0
David,
Sorry for not answering your question for so long. I am pretty sure Streeview will work with JS API version 3.15. Well since I am just starting to look at the JS API 4.0, I can't give your a sure answer. However i can't see any reasons why it won't work with version. Google API and JS API are all written in Javascript, they are all about filling html elements(div etc) map content or component.
Let me know if you encounter any issues when you use Streeview with version 4 because i am just as curious as you on this same issue.
Heming
Heming Zhu,
Thanks you so much for that wonderful Street View sample. Love how this can easily work with the ArcGIS JS API. I'm assuming this should work with ArcGIS JS API version 3.15, correct? How about 4.0 beta3? I plan to test soon, but at any rate, many, many thanks for your sample!
David
I was wondering if anyone could point me in the direction of a sample or examples of streetview working within a js api.ThanksSi
Hzhu,Great example and explanation on getting Streetview added to the ESRI AGS Javascript API.Anyway that you plan on updating the example to work with the Gmaps API v3?As well as a newer version of the AGS Js API (2.8 or 3.0)?I also can't seem to get your current example to trigger a streetview change of location when I select a new location.I am going to try update your sample sometime soon but I want to reach out to you first.Thanks,Chris Pollard
Not sure what the problem is. I'm able to reach the site with no problems from outside of our network. Maybe our server was having problems?Here is some of the relevant code: initViewer: function(llPoint){ // summary: // // mapPoint: esri.geometry.Point // In UTM console.log(this.declaredClass + "::" + arguments.callee.nom, arguments); var svPoint = new google.maps.LatLng(llPoint.y, llPoint.x); var panoramaOptions = { position: svPoint, pov: { heading: 0, pitch: 0, zoom: 1 } }; this.panorama = new google.maps.StreetViewPanorama(dojo.byId("streetview-container-inner"), panoramaOptions); this.svService = new google.maps.StreetViewService(); this.validateLocation(svPoint); this.wireEvents(); }, repositionViewer: function(llPoint){ // summary: // Points the viewer to a new position after the user clicks on the map // llPoint: esri.geometry.Point projected to lat long console.log(this.declaredClass + "::" + arguments.callee.nom, arguments); var svPoint = new google.maps.LatLng(llPoint.y, llPoint.x); this.panorama.setPosition(svPoint); this.validateLocation(svPoint); }, onPovChanged: function(){ // summary: // Fires when the point of view of the streetview viewer is changed. // Updates the graphic's orientation. //console.log(this.declaredClass + "::" + arguments.callee.nom, arguments); var symbol = this.graphic.symbol.setAngle(this.panorama.getPov().heading); this.graphic.setSymbol(symbol); }, validateLocation: function(pnt){ // summary: // Checks to make sure that there is a valid panorama for the location // pnt: google.maps.LatLng console.log(this.declaredClass + "::" + arguments.callee.nom, arguments); this.svService.getPanoramaByLocation(pnt, 50, function(data, status){ if (status != "OK"){ dojo.style("no-data-message", "display", "block"); } else { dojo.style("no-data-message", "display", "none"); } }); },
initViewer: function(llPoint){ // summary: // // mapPoint: esri.geometry.Point // In UTM console.log(this.declaredClass + "::" + arguments.callee.nom, arguments); var svPoint = new google.maps.LatLng(llPoint.y, llPoint.x); var panoramaOptions = { position: svPoint, pov: { heading: 0, pitch: 0, zoom: 1 } }; this.panorama = new google.maps.StreetViewPanorama(dojo.byId("streetview-container-inner"), panoramaOptions); this.svService = new google.maps.StreetViewService(); this.validateLocation(svPoint); this.wireEvents(); }, repositionViewer: function(llPoint){ // summary: // Points the viewer to a new position after the user clicks on the map // llPoint: esri.geometry.Point projected to lat long console.log(this.declaredClass + "::" + arguments.callee.nom, arguments); var svPoint = new google.maps.LatLng(llPoint.y, llPoint.x); this.panorama.setPosition(svPoint); this.validateLocation(svPoint); }, onPovChanged: function(){ // summary: // Fires when the point of view of the streetview viewer is changed. // Updates the graphic's orientation. //console.log(this.declaredClass + "::" + arguments.callee.nom, arguments); var symbol = this.graphic.symbol.setAngle(this.panorama.getPov().heading); this.graphic.setSymbol(symbol); }, validateLocation: function(pnt){ // summary: // Checks to make sure that there is a valid panorama for the location // pnt: google.maps.LatLng console.log(this.declaredClass + "::" + arguments.callee.nom, arguments); this.svService.getPanoramaByLocation(pnt, 50, function(data, status){ if (status != "OK"){ dojo.style("no-data-message", "display", "block"); } else { dojo.style("no-data-message", "display", "none"); } }); },
Přihlášení členové mohou přispívat, sledovat aktualizace a další. Jste tu noví? Zaregistrujte si bezplatný účet.
Find useful guides, FAQs, and documents to help you navigate and make the most of Esri Community.