coordinates - JAVA proper lat/long coords for google street view URL -
i working on getting coordinates application , being able lookup/display street view of location. doing getting lat long of point in application, building url parameters shown here: https://developers.google.com/maps/documentation/streetview/intro issues know coordinates on street due nature of application, google maps url saids "sorry have no imagery here" when attempting visit url display picture. code below:
igeometry shape = closeststationorspanfw.getifeature().getshapecopy(); ipoint point = null; if (shape instanceof ipoint) { point = (ipoint) shape; } double xcoord = point.getx(); double ycoord = point.gety(); system.out.println("original x coordinate: " + xcoord); system.out.println("original y coordinate: " + ycoord); geometryutil.projectlatlong(point); system.out.println("new coords: " + point.getx() + " " + point.gety());
i think there may issue spatial reference using? (i.e: i'm using different coordinate system google maps api) i've read not case
note point.getspatialreference().getname() print "gcs_north_american_1983"
and example of failing url here: https://maps.googleapis.com/maps/api/streetview?size=600x300&location=-87.858763145,34.6677027164
try move coordinates google map, not google street view. far road.
actually -87° 3° on south pole!
check here: http://www.latlong.net/c/?lat=-87.858763145&long=34.6677027164
and zoom minus many times see are!
Comments
Post a Comment