Select to view content in your preferred language

FrStreetView

2989
23
10-19-2010 08:11 AM
philippschnetzer
Occasional Contributor III
Frank Roberts released his FrStreetView widget on the code gallery a few days ago.  It looks and functions great!  I have tried to change the mxml to work with my wkid (2961) but no luck yet.   Can anyone solve this issue...here is the portion of code that needs to be changed:

private function mouseClickHandler(event:MouseEvent):void
   {
   const frmapPoint:MapPoint = map.toMapFromStage(event.stageX, event.stageY);
    var latlong:MapPoint;
    var wkidString:String = frmapPoint.spatialReference.wkid.toString();
  //Alert.show("Spatial Ref for map: " + frmapPoint.spatialReference.wkid.toString());
    if ( wkidString == "102100")
    {
   latlong = WebMercatorUtil.webMercatorToGeographic(frmapPoint) as MapPoint;
     frLat = latlong.y.toFixed(6);
     frLong = latlong.x.toFixed(6);
     displayForm(frLat, frLong);
    }
    else if ( wkidString == "3857")
    {
   latlong = WebMercatorUtil.webMercatorToGeographic(frmapPoint) as MapPoint;
     frLat = latlong.y.toFixed(6);
     frLong = latlong.x.toFixed(6);
     displayForm(frLat, frLong);
    }
    else if ( wkidString == "4326")
    {
     latlong = map.toMapFromStage(event.stageX, event.stageY);
     frLat = latlong.y.toFixed(12);
     frLong = latlong.x.toFixed(12);
     displayForm(frLat, frLong);
    }
    else
    {
     //Alert.show("Non client side projection");
     var outSR:SpatialReference = new SpatialReference(4326);
     geometryService.project([frmapPoint as Geometry], outSR);
    }
    
    var graphic:Graphic = new Graphic(); 
    var mapPoint2:MapPoint = frmapPoint;
    mapPoint2.spatialReference = map.spatialReference;    
    graphic.geometry = mapPoint2;    
    graphicsLayer.clear();    
    graphicsLayer.add(graphic);


wkid=2961 is a NAD83/UTM coordinate system with units in meters.

Thanks!

Here's the link to Franks widget: http://www.arcgis.com/home/item.html?id=dc56d2ab11534d24a5559ea9dc8f5119
Tags (2)
0 Kudos
23 Replies
PatrickMcGarry
New Contributor III
I managed to get the code compiled and working in 3.3. There is a slight difference to the default of the dual map in that the info box is unchecked. Here is the precompiled widget for 3.3 for anyone interested.
0 Kudos
RonCassiglia
New Contributor
Patrick,

Do you still have the source code?

If so, can you post it?

Thanks
Ron
0 Kudos
FrankRoberts
Occasional Contributor III
First off sorry for my relative quietness over the past year or two.  I changed my position at Innovate and I have become the Director of IT, opposed to the developer I use to be.  I have attached updated code for both compiled and un-compiled widget for 3.6.

As a side note, our team has already started on development of a new widget for the new ArcGIS Web App Builder.  If you want to test drive that and provide comments please check it out here:

http://it.innovateteam.com/outgoing/WebAppBuilderStreetViewWidget/

Have a great summer, and hope to see some of you at the UC in July.
0 Kudos
RonCassiglia
New Contributor
Thank you Frank, this is great. This widget is very cool and useful. I just started working with FDNY GIS and are trying to understand everything (lots of information). Unfortunately, I will not be at the UC but Steve, my boss, will be.

Have a great summer, and thanks again.
0 Kudos