none
Is there a way to get streetside static image of front of house with only latitude longitude? RRS feed

  • Question

  • This seems like a long shot but I'll ask anyway. Is there a way to specify latitude longitude coordinates or even an address in the static image request and get back a street side image of the front of the house/property? I know you can specify pitch and heading but I will not have these data points at the time of making the request.

    The example request below is by default oriented towards the street.

    https://dev.virtualearth.net/REST/V1/Imagery/Map/Streetside/33.593697, -112.207367?mapSize=757,491&zoomLevel=1&key={BingMapsKey}

    The only reason I thought this might be in the realm of possibilities is because when I search the latitude longitude coordinates or the address in Bing's search, and click on the streetside image, it correctly orientates to the front of the house.

    Bing Search correctly calculates orientation

    Thursday, November 14, 2019 11:46 PM

All replies

  • When you issue a geocoding request for an address, you should get back 2 points: One is a routable point which should be on the road, the other is the rooftop point which should be on the house itself. You should be able to calculate a heading from these two points, and request a streetside image from the routable point with the heading you calculated.

    If you only have a lat/long and not an address, you may be able to use the location intelligence service to discover nearby addresses.

    Friday, November 15, 2019 1:20 AM
    Moderator
  • I just took a look at the Bing geocode response and it does indeed return a "Display" (rooftop) value and a "Route" (street) value. From there I was able to calculate a heading. 

    Unfortunately in production we are using Google for the geocode and Bing for the map/image generation. Google's response does not return rooftop and street coordinates. For now I will have to abandon the effort unless there is some way to have the streetside image request look up the heading value at the time the request is made.

    Friday, November 15, 2019 5:45 PM
  • I am afraid we are not the experts on getting directional info from Google but a quick search indicates a "Viewport" option on location_type = ROOFTOP you might check out.  Otherwise it should be very easy to switch from the Google Geocoder to the Bing Geocoder  :) .
    Friday, November 15, 2019 6:00 PM
    Owner
  • Yeah it would be nice to do everything from just Bing.

    In the google response I see what looks to be the rooftop coordinates and then two sets of coordinates as "viewport" and "bounds" which I believe are just bounding box coordinates.

            <geometry>
                <location>
                    <lat>33.6567276</lat>
                    <lng>-112.0348489</lng>
                </location>
                <location_type>ROOFTOP</location_type>
                <viewport>
                    <southwest>
                        <lat>33.6554037</lat>
                        <lng>-112.0362419</lng>
                    </southwest>
                    <northeast>
                        <lat>33.6581017</lat>
                        <lng>-112.0335440</lng>
                    </northeast>
                </viewport>
                <bounds>
                    <southwest>
                        <lat>33.6566398</lat>
                        <lng>-112.0350284</lng>
                    </southwest>
                    <northeast>
                        <lat>33.6568656</lat>
                        <lng>-112.0347575</lng>
                    </northeast>
                </bounds>
            </geometry>

    Friday, November 15, 2019 7:16 PM
  • I can only repeat that I don't have insight into Google's solution but I would guess the viewport would be something different than bounds or why would they have both?
    Tuesday, November 19, 2019 7:37 PM
    Owner