var wgs:MapPoint = new MapPoint(attr.longitude, attr.latitude, new SpatialReference(4326)); var mp:MapPoint = WebMercatorUtil.geographicToWebMercator(wgs) as MapPoint;
<?xml version="1.0" encoding="utf-8"?>
<viewer:BaseWidget xmlns:fx="http://ns.adobe.com/mxml/2009"
xmlns:s="library://ns.adobe.com/flex/spark"
xmlns:mx="library://ns.adobe.com/flex/mx"
xmlns:viewer="com.esri.viewer.*"
xmlns:main="widgets.Zillow.main.*"
xmlns:ui="widgets.Zillow.main.view.ui.*"
layout="absolute"
widgetConfigLoaded="basewidget_widgetConfigLoadedHandler(event)">
<fx:Declarations>
<main:ZillowContext contextView="{this}" />
</fx:Declarations>
<fx:Script>
<![CDATA[
protected function basewidget_widgetConfigLoadedHandler(event:Event):void
{
if (configXML)
{
var zwsid:String = configXML.zwsid;
vManager.zwsid = zwsid;
vManager.map = map;
}
}
]]>
</fx:Script>
<fx:Style source="assets/zillowwidget.css" />
<viewer:WidgetTemplate id="wTemplate"
width="300"
height="315"
minHeight="315"
minWidth="300">
<ui:ViewManager id="vManager"
width="100%"
height="100%" />
</viewer:WidgetTemplate>
</viewer:BaseWidget>