SlideShare a Scribd company logo
1 of 170
Download to read offline
Yet Another
Mapping API - Not !
      Mansour Raad
     mraad@esri.com
www.esri.com/flex
www.esri.com/flex
ArcGIS Services
• Map Tiles ESRI / Virtual Earth (token)
• Geocoding / Reverse
• Query / Identify
• Routing with Barriers and Time Windows
• Buffer / Projection
• GeoProcessing
You & ArcGIS




Blaze
PHP               Local AGS
.Net
Map “Hello World”
Map “Hello World”
1.<?xml version=quot;1.0quot; encoding=quot;utf-8quot;?>
2.<mx:Application
3. xmlns:mx=quot;http://www.adobe.com/2006/mxmlquot;
4. xmlns:esri=quot;http://www.esri.com/2008/agsquot;
5. layout=quot;absolutequot;
6. >
7. <esri:Map id=quot;mapquot;>
8.    <esri:ArcGISTiledMapServiceLayer url=”http://host/rest/map”/>
9. </esri:Map>
10.</mx:Application>
Map “Hello World”
1.<?xml version=quot;1.0quot; encoding=quot;utf-8quot;?>
2.<mx:Application
3. xmlns:mx=quot;http://www.adobe.com/2006/mxmlquot;
4. xmlns:esri=quot;http://www.esri.com/2008/agsquot;
5. layout=quot;absolutequot;
6. >
7. <esri:Map id=quot;mapquot;>
8.    <esri:ArcGISTiledMapServiceLayer url=”http://host/rest/map”/>
9. </esri:Map>
10.</mx:Application>
1.<?xml version=quot;1.0quot; encoding=quot;utf-8quot;?>
2.<mx:Application
3. xmlns:mx=quot;http://www.adobe.com/2006/mxmlquot;
4. xmlns:esri=quot;http://www.esri.com/2008/agsquot;
5. layout=quot;absolutequot;
6. >
7. <esri:Map id=quot;mapquot; openHandCursorVisible=quot;falsequot; zoomSliderVisible=quot;falsequot;>
8.    <esri:ArcGISTiledMapServiceLayer id=quot;layerquot; url=quot;{cb.selectedItem.url}quot;/>
9. </esri:Map>
10. <mx:ComboBox id=quot;cbquot; dataProvider=quot;{[
11.    {label:'Imagery',url:'http://host/rest/Image'},
12.    {label:'Physical',url:'http://host/rest/Physical'}
13.    ]}quot;/>
14.</mx:Application>
1.<?xml version=quot;1.0quot; encoding=quot;utf-8quot;?>
2.<mx:Application
3. xmlns:mx=quot;http://www.adobe.com/2006/mxmlquot;
4. xmlns:esri=quot;http://www.esri.com/2008/agsquot;
5. layout=quot;absolutequot;
6. >
7. <esri:Map id=quot;mapquot; openHandCursorVisible=quot;falsequot; zoomSliderVisible=quot;falsequot;>
8.    <esri:ArcGISTiledMapServiceLayer id=quot;layerquot; url=quot;{cb.selectedItem.url}quot;/>
9. </esri:Map>
10. <mx:ComboBox id=quot;cbquot; dataProvider=quot;{[
11.    {label:'Imagery',url:'http://host/rest/Image'},
12.    {label:'Physical',url:'http://host/rest/Physical'}
13.    ]}quot;/>
14.</mx:Application>
1.<?xml version=quot;1.0quot; encoding=quot;utf-8quot;?>
2.<mx:Application
3. xmlns:mx=quot;http://www.adobe.com/2006/mxmlquot;
4. xmlns:esri=quot;http://www.esri.com/2008/agsquot;
5. layout=quot;absolutequot;
6. >
7. <esri:Map id=quot;mapquot; openHandCursorVisible=quot;falsequot; zoomSliderVisible=quot;falsequot;>
8.    <esri:ArcGISTiledMapServiceLayer id=quot;layerquot; url=quot;{cb.selectedItem.url}quot;/>
9. </esri:Map>
10. <mx:ComboBox id=quot;cbquot; dataProvider=quot;{[
11.    {label:'Imagery',url:'http://host/rest/Image'},
12.    {label:'Physical',url:'http://host/rest/Physical'}
13.    ]}quot;/>
14.</mx:Application>
GeoProcessing
 DriveTimes
1. <esri:Geoprocessor id=quot;gpquot; url=quot;<GeoProcessesorURL>quot; showBusyCursor=quot;truequot;/>
2. <esri:Map id=quot;mapquot; openHandCursorVisible=quot;falsequot; mapClick=quot;mapClickHandler(event)quot;>
3.   <esri:extent>
4.     <esri:Extent xmin=quot;-95.41quot; ymin=quot;38.86quot; xmax=quot;-95.1quot; ymax=quot;39.06quot;>
5.        <esri:SpatialReference wkid=quot;4326quot;/>
6.     </esri:Extent>
7.   </esri:extent>
8.   <esri:ArcGISTiledMapServiceLayer url=quot;<MapServiceURL>quot;/>
9.   <esri:GraphicsLayer id=quot;polygonLayerquot; graphicProvider=quot;{gp.executeFirstFeatureSet.features}quot;>
10.      <esri:renderer>
11.        <esri:UniqueValueRenderer attribute=quot;ToBreakquot;>
12.           <esri:UniqueValueInfo value=quot;1quot;>
13.              <esri:symbol>
14.                <esri:SimpleFillSymbol alpha=quot;0.5quot; color=quot;0xFF0000quot;/>
15.              </esri:symbol>
16.           </esri:UniqueValueInfo>
17.           <esri:UniqueValueInfo value=quot;2quot;>
18.              <esri:symbol>
19.                <esri:SimpleFillSymbol alpha=quot;0.5quot; color=quot;0x00FF00quot;/>
20.              </esri:symbol>
21.           </esri:UniqueValueInfo>
22.           <esri:UniqueValueInfo value=quot;3quot;>
23.              <esri:symbol>
24.                <esri:SimpleFillSymbol alpha=quot;0.5quot; color=quot;0x0000FFquot;/>
25.              </esri:symbol>
26.           </esri:UniqueValueInfo>
27.        </esri:UniqueValueRenderer>
28.      </esri:renderer>
29.   </esri:GraphicsLayer>
30.   <esri:GraphicsLayer id=quot;pointLayerquot;/>
31. </esri:Map>
1. <esri:Geoprocessor id=quot;gpquot; url=quot;<GeoProcessesorURL>quot; showBusyCursor=quot;truequot;/>
2. <esri:Map id=quot;mapquot; openHandCursorVisible=quot;falsequot; mapClick=quot;mapClickHandler(event)quot;>
3.   <esri:extent>
4.     <esri:Extent xmin=quot;-95.41quot; ymin=quot;38.86quot; xmax=quot;-95.1quot; ymax=quot;39.06quot;>
5.        <esri:SpatialReference wkid=quot;4326quot;/>
6.     </esri:Extent>
7.   </esri:extent>
8.   <esri:ArcGISTiledMapServiceLayer url=quot;<MapServiceURL>quot;/>
9.   <esri:GraphicsLayer id=quot;polygonLayerquot; graphicProvider=quot;{gp.executeFirstFeatureSet.features}quot;>
10.      <esri:renderer>
11.        <esri:UniqueValueRenderer attribute=quot;ToBreakquot;>
12.           <esri:UniqueValueInfo value=quot;1quot;>
13.              <esri:symbol>
14.                <esri:SimpleFillSymbol alpha=quot;0.5quot; color=quot;0xFF0000quot;/>
15.              </esri:symbol>
16.           </esri:UniqueValueInfo>
17.           <esri:UniqueValueInfo value=quot;2quot;>
18.              <esri:symbol>
19.                <esri:SimpleFillSymbol alpha=quot;0.5quot; color=quot;0x00FF00quot;/>
20.              </esri:symbol>
21.           </esri:UniqueValueInfo>
22.           <esri:UniqueValueInfo value=quot;3quot;>
23.              <esri:symbol>
24.                <esri:SimpleFillSymbol alpha=quot;0.5quot; color=quot;0x0000FFquot;/>
25.              </esri:symbol>
26.           </esri:UniqueValueInfo>
27.        </esri:UniqueValueRenderer>
28.      </esri:renderer>
29.   </esri:GraphicsLayer>
30.   <esri:GraphicsLayer id=quot;pointLayerquot;/>
31. </esri:Map>
1. <esri:Geoprocessor id=quot;gpquot; url=quot;<GeoProcessesorURL>quot; showBusyCursor=quot;truequot;/>
2. <esri:Map id=quot;mapquot; openHandCursorVisible=quot;falsequot; mapClick=quot;mapClickHandler(event)quot;>
3.   <esri:extent>
4.     <esri:Extent xmin=quot;-95.41quot; ymin=quot;38.86quot; xmax=quot;-95.1quot; ymax=quot;39.06quot;>
5.        <esri:SpatialReference wkid=quot;4326quot;/>
6.     </esri:Extent>
7.   </esri:extent>
8.   <esri:ArcGISTiledMapServiceLayer url=quot;<MapServiceURL>quot;/>
9.   <esri:GraphicsLayer id=quot;polygonLayerquot; graphicProvider=quot;{gp.executeFirstFeatureSet.features}quot;>
10.      <esri:renderer>
11.        <esri:UniqueValueRenderer attribute=quot;ToBreakquot;>
12.           <esri:UniqueValueInfo value=quot;1quot;>
13.              <esri:symbol>
14.                <esri:SimpleFillSymbol alpha=quot;0.5quot; color=quot;0xFF0000quot;/>
15.              </esri:symbol>
16.           </esri:UniqueValueInfo>
17.           <esri:UniqueValueInfo value=quot;2quot;>
18.              <esri:symbol>
19.                <esri:SimpleFillSymbol alpha=quot;0.5quot; color=quot;0x00FF00quot;/>
20.              </esri:symbol>
21.           </esri:UniqueValueInfo>
22.           <esri:UniqueValueInfo value=quot;3quot;>
23.              <esri:symbol>
24.                <esri:SimpleFillSymbol alpha=quot;0.5quot; color=quot;0x0000FFquot;/>
25.              </esri:symbol>
26.           </esri:UniqueValueInfo>
27.        </esri:UniqueValueRenderer>
28.      </esri:renderer>
29.   </esri:GraphicsLayer>
30.   <esri:GraphicsLayer id=quot;pointLayerquot;/>
31. </esri:Map>
1. <esri:Geoprocessor id=quot;gpquot; url=quot;<GeoProcessesorURL>quot; showBusyCursor=quot;truequot;/>
2. <esri:Map id=quot;mapquot; openHandCursorVisible=quot;falsequot; mapClick=quot;mapClickHandler(event)quot;>
3.   <esri:extent>
4.     <esri:Extent xmin=quot;-95.41quot; ymin=quot;38.86quot; xmax=quot;-95.1quot; ymax=quot;39.06quot;>
5.        <esri:SpatialReference wkid=quot;4326quot;/>
6.     </esri:Extent>
7.   </esri:extent>
8.   <esri:ArcGISTiledMapServiceLayer url=quot;<MapServiceURL>quot;/>
9.   <esri:GraphicsLayer id=quot;polygonLayerquot; graphicProvider=quot;{gp.executeFirstFeatureSet.features}quot;>
10.      <esri:renderer>
11.        <esri:UniqueValueRenderer attribute=quot;ToBreakquot;>
12.           <esri:UniqueValueInfo value=quot;1quot;>
13.              <esri:symbol>
14.                <esri:SimpleFillSymbol alpha=quot;0.5quot; color=quot;0xFF0000quot;/>
15.              </esri:symbol>
16.           </esri:UniqueValueInfo>
17.           <esri:UniqueValueInfo value=quot;2quot;>
18.              <esri:symbol>
19.                <esri:SimpleFillSymbol alpha=quot;0.5quot; color=quot;0x00FF00quot;/>
20.              </esri:symbol>
21.           </esri:UniqueValueInfo>
22.           <esri:UniqueValueInfo value=quot;3quot;>
23.              <esri:symbol>
24.                <esri:SimpleFillSymbol alpha=quot;0.5quot; color=quot;0x0000FFquot;/>
25.              </esri:symbol>
26.           </esri:UniqueValueInfo>
27.        </esri:UniqueValueRenderer>
28.      </esri:renderer>
29.   </esri:GraphicsLayer>
30.   <esri:GraphicsLayer id=quot;pointLayerquot;/>
31. </esri:Map>
1.<mx:Script>
2. <![CDATA[
3.    import com.esri.ags.tasks.FeatureSet;
4.    import com.esri.ags.Graphic;
5.    import com.esri.ags.events.MapMouseEvent;

7.    private function mapClickHandler(event:MapMouseEvent):void
8.    {
9.        const graphic:Graphic = new Graphic(event.mapPoint);
10.        pointLayer.clear();
11.        pointLayer.add(graphic);
12.        const featureSet:FeatureSet = new FeatureSet([graphic]);
13.        gp.execute({quot;Input_Locationquot;: featureSet, quot;Drive_Timesquot;: quot;1 2 3quot;});
14.     }
15. ]]>
16.</mx:Script>
1.<mx:Script>
2. <![CDATA[
3.    import com.esri.ags.tasks.FeatureSet;
4.    import com.esri.ags.Graphic;
5.    import com.esri.ags.events.MapMouseEvent;

7.    private function mapClickHandler(event:MapMouseEvent):void
8.    {
9.        const graphic:Graphic = new Graphic(event.mapPoint);
10.        pointLayer.clear();
11.        pointLayer.add(graphic);
12.        const featureSet:FeatureSet = new FeatureSet([graphic]);
13.        gp.execute({quot;Input_Locationquot;: featureSet, quot;Drive_Timesquot;: quot;1 2 3quot;});
14.     }
15. ]]>
16.</mx:Script>
Demo
Sample 1-2
DriveTimes
Many Children Layers
Many Graphic Layers
GraphicLayer
GraphicLayer

• graphicProvider
 • ArrayCollection
• renderer
 • graphic with no symbol
Graphic
Graphic

• UIComponent
 • Flex life cycle management
• geometry
• symbol
• attributes
Graphic/Geometry
Graphic/Geometry

• Geometry - base class
 • MapPoint
 • Polyline
 • Polygon
Polyline/Polygon
Polyline/Polygon


• Multi Part Geometry
• Islands of Hawaii
Graphic/Symbol
Graphic/Symbol

• Symbol - base class
• Draws geometry of Graphic
• Uses Flash Drawing API
Graphic/Attributes
Graphic/Attributes


• Any Object !
• Attach any dynamic property to Graphic
Geometry/Symbol
Geometry/Symbol


• [Bindable] Properties
• Dispatch CHANGE event
Demo
Sample 3-7
LCDS
LCDS

• Remote Objects
• Messaging
• Data Services
Feature
Feature

• Serializable server side object
• Properties
 • featureID:int;
 • geometry:IGeometry;
 • attributes:ASObject;
public class Feature
    implements Serializable
{
  private int m_featureId;
  private IGeometry m_geometry;
  private ASObject m_attributes;

  public Feature()
  {
  }

  public int getFeatureId()
  {
    return m_featureId;
  }

  public void setFeatureId(final int featureId)
  {
    m_featureId = featureId;
  }

  ...
public class MapPoint
    implements IGeometry
{
  private double m_x;
  private double m_y;
  private SpatialReference m_spatialReference;

  public MapPoint(){
  }

  public MapPoint(final double x, final double y){
    m_x = x;
    m_y = y;
  }

  public double getX(){
    return m_x;
  }

  public void setX(final double x){
    m_x = x;
  }

  ...
DS Assembler

• fill
• createItem
• getItem
• updateItem
• deleteItem
private int m_featureId = 1;
private Map<Integer, Feature> m_map = new ConcurrentHashMap<Integer, Feature>(17);

public Collection fill(final List fillParameters)
{
  return m_map.values();
}

public Object getItem(final Map map)
{
  return m_map.get(map.get(quot;featureIdquot;));
}

public void createItem(final Object newVersion)
{
  final Feature Feature = (Feature) newVersion;
  Feature.setFeatureId(m_featureId++);
  m_map.put(Feature.getFeatureId(), Feature);
}

public void updateItem(final Object newVersion, final Object prevVersion, final List changes)
{
  final Feature Feature = (Feature) newVersion;
  m_map.put(Feature.getFeatureId(), Feature);
}

public void deleteItem(final Object prevVersion)
{
  final Feature Feature = (Feature) prevVersion;
  m_map.remove(Feature.getFeatureId());
}
private int m_featureId = 1;
private Map<Integer, Feature> m_map = new ConcurrentHashMap<Integer, Feature>(17);

public Collection fill(final List fillParameters)
{
  return m_map.values();
}

public Object getItem(final Map map)
{
  return m_map.get(map.get(quot;featureIdquot;));
}

public void createItem(final Object newVersion)
{
  final Feature Feature = (Feature) newVersion;
  Feature.setFeatureId(m_featureId++);
  m_map.put(Feature.getFeatureId(), Feature);
}

public void updateItem(final Object newVersion, final Object prevVersion, final List changes)
{
  final Feature Feature = (Feature) newVersion;
  m_map.put(Feature.getFeatureId(), Feature);
}

public void deleteItem(final Object prevVersion)
{
  final Feature Feature = (Feature) prevVersion;
  m_map.remove(Feature.getFeatureId());
}
private int m_featureId = 1;
private Map<Integer, Feature> m_map = new ConcurrentHashMap<Integer, Feature>(17);

public Collection fill(final List fillParameters)
{
  return m_map.values();
}

public Object getItem(final Map map)
{
  return m_map.get(map.get(quot;featureIdquot;));
}

public void createItem(final Object newVersion)
{
  final Feature Feature = (Feature) newVersion;
  Feature.setFeatureId(m_featureId++);
  m_map.put(Feature.getFeatureId(), Feature);
}

public void updateItem(final Object newVersion, final Object prevVersion, final List changes)
{
  final Feature Feature = (Feature) newVersion;
  m_map.put(Feature.getFeatureId(), Feature);
}

public void deleteItem(final Object prevVersion)
{
  final Feature Feature = (Feature) prevVersion;
  m_map.remove(Feature.getFeatureId());
}
private int m_featureId = 1;
private Map<Integer, Feature> m_map = new ConcurrentHashMap<Integer, Feature>(17);

public Collection fill(final List fillParameters)
{
  return m_map.values();
}

public Object getItem(final Map map)
{
  return m_map.get(map.get(quot;featureIdquot;));
}

public void createItem(final Object newVersion)
{
  final Feature Feature = (Feature) newVersion;
  Feature.setFeatureId(m_featureId++);
  m_map.put(Feature.getFeatureId(), Feature);
}

public void updateItem(final Object newVersion, final Object prevVersion, final List changes)
{
  final Feature Feature = (Feature) newVersion;
  m_map.put(Feature.getFeatureId(), Feature);
}

public void deleteItem(final Object prevVersion)
{
  final Feature Feature = (Feature) prevVersion;
  m_map.remove(Feature.getFeatureId());
}
private int m_featureId = 1;
private Map<Integer, Feature> m_map = new ConcurrentHashMap<Integer, Feature>(17);

public Collection fill(final List fillParameters)
{
  return m_map.values();
}

public Object getItem(final Map map)
{
  return m_map.get(map.get(quot;featureIdquot;));
}

public void createItem(final Object newVersion)
{
  final Feature Feature = (Feature) newVersion;
  Feature.setFeatureId(m_featureId++);
  m_map.put(Feature.getFeatureId(), Feature);
}

public void updateItem(final Object newVersion, final Object prevVersion, final List changes)
{
  final Feature Feature = (Feature) newVersion;
  m_map.put(Feature.getFeatureId(), Feature);
}

public void deleteItem(final Object prevVersion)
{
  final Feature Feature = (Feature) prevVersion;
  m_map.remove(Feature.getFeatureId());
}
private int m_featureId = 1;
private Map<Integer, Feature> m_map = new ConcurrentHashMap<Integer, Feature>(17);

public Collection fill(final List fillParameters)
{
  return m_map.values();
}

public Object getItem(final Map map)
{
  return m_map.get(map.get(quot;featureIdquot;));
}

public void createItem(final Object newVersion)
{
  final Feature Feature = (Feature) newVersion;
  Feature.setFeatureId(m_featureId++);
  m_map.put(Feature.getFeatureId(), Feature);
}

public void updateItem(final Object newVersion, final Object prevVersion, final List changes)
{
  final Feature Feature = (Feature) newVersion;
  m_map.put(Feature.getFeatureId(), Feature);
}

public void deleteItem(final Object prevVersion)
{
  final Feature Feature = (Feature) prevVersion;
  m_map.remove(Feature.getFeatureId());
}
data-management-config.xml
data-management-config.xml
    <destination id=quot;featurequot;>
      <properties>
        <factory>spring</factory>
        <source>featureAssembler</source>
        <scope>application</scope>
        <use-transactions>false</use-transactions>
        <metadata>
           <identity property=quot;featureIdquot;/>
        </metadata>
        <network>
           <paging enabled=quot;falsequot; pageSize=quot;10quot;/>
        </network>
      </properties>
    </destination>
Back To The Client :-)
package com.esri.cats
{
  import com.esri.ags.SpatialReference;
  import com.esri.ags.geometry.MapPoint;

    import flash.net.registerClassAlias;

    import mx.core.IMXMLObject;

    public class ClassAliasRegistry implements IMXMLObject
    {
      public function initialized(document:Object, id:String):void
      {
        registerClassAlias(quot;com.esri.cats.MapPointquot;, MapPoint);
        registerClassAlias(quot;com.esri.cats.SpatialReferencequot;, SpatialReference);
      }
    }
}
package com.esri.cats
{
  import com.esri.ags.SpatialReference;
  import com.esri.ags.geometry.MapPoint;

    import flash.net.registerClassAlias;

    import mx.core.IMXMLObject;

    public class ClassAliasRegistry implements IMXMLObject
    {
      public function initialized(document:Object, id:String):void
      {
        registerClassAlias(quot;com.esri.cats.MapPointquot;, MapPoint);
        registerClassAlias(quot;com.esri.cats.SpatialReferencequot;, SpatialReference);
      }
    }
}
1.package com.esri.cats
2.{
3. import com.esri.ags.geometry.Geometry;

5. [Managed]
6. [RemoteClass(alias=quot;com.esri.cats.Featurequot;)]
7. public class Feature
8. {
9.    public var featureId:int;
10.    public var geometry:Geometry;
11.    public var attributes:Object;
12.
13.    public function Feature()
14.    {
15.    }
16.
17. }
18.}
1.package com.esri.cats
2.{
3. import com.esri.ags.geometry.Geometry;

5. [Managed]
6. [RemoteClass(alias=quot;com.esri.cats.Featurequot;)]
7. public class Feature
8. {
9.    public var featureId:int;
10.    public var geometry:Geometry;
11.    public var attributes:Object;
12.
13.    public function Feature()
14.    {
15.    }
16.
17. }
18.}
1.<cats:ClassAliasRegistry/>
2.<mx:ArrayCollection id=quot;featuresquot;
3.     collectionChange=quot;collectionChangeHandler(event)quot;/>
4.<mx:DataService id=quot;dsquot; destination=quot;featurequot;/>
5.<esri:Map id=quot;mapquot; load=quot;ds.fill(features)quot;>
6. <esri:GraphicsLayer id=quot;graphicsLayerquot;/>
7. <esri:GraphicsLayer id=quot;pointLayerquot;>
8.    <esri:symbol>
9.       <esri:SimpleMarkerSymbol color=quot;0xFFFF00quot;/>
10.     </esri:symbol>
11. </esri:GraphicsLayer>
12.</esri:Map>
1.<cats:ClassAliasRegistry/>
2.<mx:ArrayCollection id=quot;featuresquot;
3.     collectionChange=quot;collectionChangeHandler(event)quot;/>
4.<mx:DataService id=quot;dsquot; destination=quot;featurequot;/>
5.<esri:Map id=quot;mapquot; load=quot;ds.fill(features)quot;>
6. <esri:GraphicsLayer id=quot;graphicsLayerquot;/>
7. <esri:GraphicsLayer id=quot;pointLayerquot;>
8.    <esri:symbol>
9.       <esri:SimpleMarkerSymbol color=quot;0xFFFF00quot;/>
10.     </esri:symbol>
11. </esri:GraphicsLayer>
12.</esri:Map>
1.<cats:ClassAliasRegistry/>
2.<mx:ArrayCollection id=quot;featuresquot;
3.     collectionChange=quot;collectionChangeHandler(event)quot;/>
4.<mx:DataService id=quot;dsquot; destination=quot;featurequot;/>
5.<esri:Map id=quot;mapquot; load=quot;ds.fill(features)quot;>
6. <esri:GraphicsLayer id=quot;graphicsLayerquot;/>
7. <esri:GraphicsLayer id=quot;pointLayerquot;>
8.    <esri:symbol>
9.       <esri:SimpleMarkerSymbol color=quot;0xFFFF00quot;/>
10.     </esri:symbol>
11. </esri:GraphicsLayer>
12.</esri:Map>
1.<cats:ClassAliasRegistry/>
2.<mx:ArrayCollection id=quot;featuresquot;
3.     collectionChange=quot;collectionChangeHandler(event)quot;/>
4.<mx:DataService id=quot;dsquot; destination=quot;featurequot;/>
5.<esri:Map id=quot;mapquot; load=quot;ds.fill(features)quot;>
6. <esri:GraphicsLayer id=quot;graphicsLayerquot;/>
7. <esri:GraphicsLayer id=quot;pointLayerquot;>
8.    <esri:symbol>
9.       <esri:SimpleMarkerSymbol color=quot;0xFFFF00quot;/>
10.     </esri:symbol>
11. </esri:GraphicsLayer>
12.</esri:Map>
1.<cats:ClassAliasRegistry/>
2.<mx:ArrayCollection id=quot;featuresquot;
3.     collectionChange=quot;collectionChangeHandler(event)quot;/>
4.<mx:DataService id=quot;dsquot; destination=quot;featurequot;/>
5.<esri:Map id=quot;mapquot; load=quot;ds.fill(features)quot;>
6. <esri:GraphicsLayer id=quot;graphicsLayerquot;/>
7. <esri:GraphicsLayer id=quot;pointLayerquot;>
8.    <esri:symbol>
9.       <esri:SimpleMarkerSymbol color=quot;0xFFFF00quot;/>
10.     </esri:symbol>
11. </esri:GraphicsLayer>
12.</esri:Map>
private function collectionChangeHandler(event:CollectionEvent):void
{
  switch (event.kind)
  {
     case CollectionEventKind.RESET:
       doReset(event);
       break;
     case CollectionEventKind.UPDATE:
       doUpdate(event);
       break;
  }
}
private function doReset(event:CollectionEvent):void
{
  graphicsLayer.clear();
  m_graphicsDict = new Dictionary();
  for each (var feature:Feature in features)
  {
     var graphic:Graphic = new Graphic(feature.geometry, null, feature);
     graphic.buttonMode = true;
     graphic.addEventListener(MouseEvent.MOUSE_DOWN, mouseDownHandler);
     graphic.toolTip = String(feature.attributes.coords).replace(quot; quot;, quot;nquot;);
     graphicsLayer.add(graphic);
     m_graphicsDict[feature.featureId] = graphic;
  }
}
private function doReset(event:CollectionEvent):void
{
  graphicsLayer.clear();
  m_graphicsDict = new Dictionary();
  for each (var feature:Feature in features)
  {
     var graphic:Graphic = new Graphic(feature.geometry, null, feature);
     graphic.buttonMode = true;
     graphic.addEventListener(MouseEvent.MOUSE_DOWN, mouseDownHandler);
     graphic.toolTip = String(feature.attributes.coords).replace(quot; quot;, quot;nquot;);
     graphicsLayer.add(graphic);
     m_graphicsDict[feature.featureId] = graphic;
  }
}
private function doReset(event:CollectionEvent):void
{
  graphicsLayer.clear();
  m_graphicsDict = new Dictionary();
  for each (var feature:Feature in features)
  {
     var graphic:Graphic = new Graphic(feature.geometry, null, feature);
     graphic.buttonMode = true;
     graphic.addEventListener(MouseEvent.MOUSE_DOWN, mouseDownHandler);
     graphic.toolTip = String(feature.attributes.coords).replace(quot; quot;, quot;nquot;);
     graphicsLayer.add(graphic);
     m_graphicsDict[feature.featureId] = graphic;
  }
}
private function doUpdate(event:CollectionEvent):void
{
  for each (var propertyChangeEvent:PropertyChangeEvent in event.items)
  {
     var feature:Feature = propertyChangeEvent.target as Feature;
     if (propertyChangeEvent.property === quot;geometryquot;)
     {
         var graphic:Graphic = m_graphicsDict[feature.featureId];
         if (graphic)
         {
             graphic.geometry = feature.geometry;
         }
     }
  }
}
private function doUpdate(event:CollectionEvent):void
{
  for each (var propertyChangeEvent:PropertyChangeEvent in event.items)
  {
     var feature:Feature = propertyChangeEvent.target as Feature;
     if (propertyChangeEvent.property === quot;geometryquot;)
     {
         var graphic:Graphic = m_graphicsDict[feature.featureId];
         if (graphic)
         {
             graphic.geometry = feature.geometry;
         }
     }
  }
}
private function doUpdate(event:CollectionEvent):void
{
  for each (var propertyChangeEvent:PropertyChangeEvent in event.items)
  {
     var feature:Feature = propertyChangeEvent.target as Feature;
     if (propertyChangeEvent.property === quot;geometryquot;)
     {
         var graphic:Graphic = m_graphicsDict[feature.featureId];
         if (graphic)
         {
             graphic.geometry = feature.geometry;
         }
     }
  }
}
1.private function mouseDownHandler(event:MouseEvent):void
2.{
3. const graphic:Graphic = event.target as Graphic;
4. if (graphic)
5. {
6.     m_feature = graphic.attributes as Feature;
7.     m_graphic.geometry = map.toMapFromStage(event.stageX, event.stageY);
8.     pointLayer.add(m_graphic);
9.     map.addEventListener(MouseEvent.MOUSE_MOVE, mouseMoveHandler);
10.    map.addEventListener(MouseEvent.MOUSE_UP, mouseUpHandler);
11. }
12.}

14.private function mouseMoveHandler(event:MouseEvent):void
15.{
16. m_graphic.geometry = map.toMapFromStage(event.stageX, event.stageY);
17. event.updateAfterEvent();
18.}

20.private function mouseUpHandler(event:MouseEvent):void
21.{
22. m_feature.geometry = m_graphic.geometry; // ALL DS FM is Here :-)
23. m_feature = null;
24. pointLayer.clear();
25. map.removeEventListener(MouseEvent.MOUSE_MOVE, mouseMoveHandler);
26. map.removeEventListener(MouseEvent.MOUSE_UP, mouseUpHandler);
27.}
1.private function mouseDownHandler(event:MouseEvent):void
2.{
3. const graphic:Graphic = event.target as Graphic;
4. if (graphic)
5. {
6.     m_feature = graphic.attributes as Feature;
7.     m_graphic.geometry = map.toMapFromStage(event.stageX, event.stageY);
8.     pointLayer.add(m_graphic);
9.     map.addEventListener(MouseEvent.MOUSE_MOVE, mouseMoveHandler);
10.    map.addEventListener(MouseEvent.MOUSE_UP, mouseUpHandler);
11. }
12.}

14.private function mouseMoveHandler(event:MouseEvent):void
15.{
16. m_graphic.geometry = map.toMapFromStage(event.stageX, event.stageY);
17. event.updateAfterEvent();
18.}

20.private function mouseUpHandler(event:MouseEvent):void
21.{
22. m_feature.geometry = m_graphic.geometry; // ALL DS FM is Here :-)
23. m_feature = null;
24. pointLayer.clear();
25. map.removeEventListener(MouseEvent.MOUSE_MOVE, mouseMoveHandler);
26. map.removeEventListener(MouseEvent.MOUSE_UP, mouseUpHandler);
27.}
1.private function mouseDownHandler(event:MouseEvent):void
2.{
3. const graphic:Graphic = event.target as Graphic;
4. if (graphic)
5. {
6.     m_feature = graphic.attributes as Feature;
7.     m_graphic.geometry = map.toMapFromStage(event.stageX, event.stageY);
8.     pointLayer.add(m_graphic);
9.     map.addEventListener(MouseEvent.MOUSE_MOVE, mouseMoveHandler);
10.    map.addEventListener(MouseEvent.MOUSE_UP, mouseUpHandler);
11. }
12.}

14.private function mouseMoveHandler(event:MouseEvent):void
15.{
16. m_graphic.geometry = map.toMapFromStage(event.stageX, event.stageY);
17. event.updateAfterEvent();
18.}

20.private function mouseUpHandler(event:MouseEvent):void
21.{
22. m_feature.geometry = m_graphic.geometry; // ALL DS FM is Here :-)
23. m_feature = null;
24. pointLayer.clear();
25. map.removeEventListener(MouseEvent.MOUSE_MOVE, mouseMoveHandler);
26. map.removeEventListener(MouseEvent.MOUSE_UP, mouseUpHandler);
27.}
Demo CATS
“Lots” Features
Spatial Index
Spatial Index
• RTree
• QuadTree
• Grid / Trellis
 • Simple
 • Efficient (points)
 • Good enough !
0,0




      width,height
Xmax,Ymax
 0,0




            width,height
Xmin,Ymin
Xmax,Ymax
 0,0




            width,height
Xmin,Ymin
Xmax,Ymax
 0,0




            width,height
Xmin,Ymin
Cy


3


2


1


0
                         Cx
         0   1   2   3
Cy
                     (1,3)
3
                                 (3,2)
2                            (3,2)

1
             (0,0)
0
                                         Cx
         0       1      2    3
Cx & Cy > 0 int
Cx & Cy <   216
Dict[(cx<<16)|cy]
Cluster : Geometry
Cluster : Geometry

• Original X
• Original Y
• Cluster X
• Cluster Y
• count
ClusterSymbol : Symbol
ClusterSymbol : Symbol

• Draws a Cluster geometry instance
• Flash drawing API
 • beginFill - based on cluster count
 • drawRoundedRect - based on Cx,Cy
Demo
DrawSymbol Code
Adaptive Clustering
Adaptive Clustering

• JIT
• “Smart” algorithm - all client side.
• React to map extent change
Given set of map points
Given set of map points
Assign map point to cluster set
Given set of map points
Assign map point to cluster set
do
Given set of map points
Assign map point to cluster set
do
 spatial index clusters
Given set of map points
Assign map point to cluster set
do
 spatial index clusters
 for each cluster Ci
Given set of map points
Assign map point to cluster set
do
 spatial index clusters
 for each cluster Ci
   find adjacent clusters Cj
Given set of map points
Assign map point to cluster set
do
 spatial index clusters
 for each cluster Ci
   find adjacent clusters Cj
   if Cj is close enough to Ci
Given set of map points
Assign map point to cluster set
do
 spatial index clusters
 for each cluster Ci
   find adjacent clusters Cj
   if Cj is close enough to Ci
     assign Cj map points to Ci
Given set of map points
Assign map point to cluster set
do
 spatial index clusters
 for each cluster Ci
   find adjacent clusters Cj
   if Cj is close enough to Ci
     assign Cj map points to Ci
     remove Cj from cluster set
Given set of map points
Assign map point to cluster set
do
 spatial index clusters
 for each cluster Ci
   find adjacent clusters Cj
   if Cj is close enough to Ci
     assign Cj map points to Ci
     remove Cj from cluster set
     adjust Ci location
Given set of map points
Assign map point to cluster set
do
 spatial index clusters
 for each cluster Ci
   find adjacent clusters Cj
   if Cj is close enough to Ci
     assign Cj map points to Ci
     remove Cj from cluster set
     adjust Ci location
repeat while overlapping clusters exist
Adjusting Ci location
Adjusting Ci location

      Ci




     Wi
Adjusting Ci location

      Ci
              Cj



              Wj
     Wi
Adjusting Ci location

      Ci
              Cj



              Wj
     Wi
Adjusting Ci location
        Ci=(Ci Wi+CjWj)/WiWj




      Wi+Wj
Demo
ClusterApp
HeatMaps are Bitmaps !
1.<?xml version=quot;1.0quot; encoding=quot;utf-8quot;?>
2.<view:PrepApplication
3. xmlns:mx=quot;http://www.adobe.com/2006/mxmlquot;
4. xmlns:esri=quot;http://www.esri.com/2008/agsquot;
5. xmlns:controller=quot;com.esri.controller.*quot;
6. xmlns:view=quot;com.esri.view.*quot;
7. layout=quot;verticalquot;
8. paddingLeft=quot;0quot;
9. paddingRight=quot;0quot;
10. paddingTop=quot;0quot;
11. paddingBottom=quot;0quot;
12. >
13. <controller:LoadCommand/>
14. <view:PrepSlider/>
15. <view:PrepMap>
16.     <view:extent>
17.       <esri:Extent xmin=quot;-143.141073quot; ymin=quot;14.930875quot; xmax=quot;-48.0570833quot; ymax=quot;57.649769quot;/>
18.     </view:extent>
19.     <esri:ArcGISTiledMapServiceLayer
20.       url=quot;http://server.arcgisonline.com/ArcGIS/rest/services/ESRI_Imagery_World_2D/MapServerquot;/>
21.     <view:PrepLayer/>
22. </view:PrepMap>
23.</view:PrepApplication>
1.<?xml version=quot;1.0quot; encoding=quot;utf-8quot;?>
2.<view:PrepApplication
3. xmlns:mx=quot;http://www.adobe.com/2006/mxmlquot;
4. xmlns:esri=quot;http://www.esri.com/2008/agsquot;
5. xmlns:controller=quot;com.esri.controller.*quot;
6. xmlns:view=quot;com.esri.view.*quot;
7. layout=quot;verticalquot;
8. paddingLeft=quot;0quot;
9. paddingRight=quot;0quot;
10. paddingTop=quot;0quot;
11. paddingBottom=quot;0quot;
12. >
13. <controller:LoadCommand/>
14. <view:PrepSlider/>
15. <view:PrepMap>
16.     <view:extent>
17.       <esri:Extent xmin=quot;-143.141073quot; ymin=quot;14.930875quot; xmax=quot;-48.0570833quot; ymax=quot;57.649769quot;/>
18.     </view:extent>
19.     <esri:ArcGISTiledMapServiceLayer
20.       url=quot;http://server.arcgisonline.com/ArcGIS/rest/services/ESRI_Imagery_World_2D/MapServerquot;/>
21.     <view:PrepLayer/>
22. </view:PrepMap>
23.</view:PrepApplication>
PrepLayer : Layer
PrepLayer : Layer
• Subclass Layer
• Override updateLayer
 • Invoked by updateDisplayList
 • create bitmap - lock/unlock
 • bitmap.fillRect each heat map point
 • graphic.bitmapFill / drawRect
PrepLayer
PrepLayer

• Kept data in 2 arrays
 • x = []
 • y = []
• Easy to AMF
• toScreenX/Y built-in functions
Demo
PrecipitationApp
Street Tracing
Street Tracing

• A*
• Create nodes and edges
• Define barriers
• Reverse geocoding
• Custom layer - faster rendering
A* / Path Finding
Streets
Streets
“Street” Graph
“Street” Graph

• Intersection - nodes
• Street Segment - edge
• Travel distance or time - cost
Nodes/Edges/Barriers
Nodes/Edges/Barriers
           C

  A                E
       B


               D
Nodes/Edges/Barriers
           C

  A                E
       B


               D
Nodes/Edges/Barriers
           C

  A                E
       B


               D
Street Info


       n St
   M ai
Street Info
                    200

             n St
         M ai

100
Street Info
                       200
                             199
                n St
            M ai

100
      101
ReverseGeocoding
ReverseGeocoding
   Main St
Left 100-200
Right 101-199
ReverseGeocoding
   Main St
Left 100-200
Right 101-199   t
ReverseGeocoding
   Main St
Left 100-200
Right 101-199   t
ReverseGeocoding
   Main St
Left 100-200
Right 101-199   t   d
ReverseGeocoding
   Main St
Left 100-200
Right 101-199   t   d
                        153 Main St
Distance Calculations
Distance Calculations

     C

               B

A
Distance Calculations

     C

               B
         P
A
Distance Calculations
                      AC • AB
                 r=
                       ∣AB∣2
         C

                         B
     r       P
A
Distance Calculations
                      AC • AB   r≺0 beyond A ↤
                 r=
                       ∣AB∣2
         C

                         B
     r       P
A
Distance Calculations
                      AC • AB   r≺0 beyond A ↤
                 r=
                       ∣AB∣2    r≻0 beyond B ↦

         C

                         B
     r       P
A
Distance Calculations
                      AC • AB   r≺0 beyond A ↤
                 r=
                       ∣AB∣2    r≻0 beyond B ↦

         C                         1 Ax Bx Cx
                                A=
                                   2 Ay By Cy
                         B
     r       P
A
Distance Calculations
                           AC • AB   r≺0 beyond A ↤
                      r=
                            ∣AB∣2    r≻0 beyond B ↦

         C                              1 Ax Bx Cx
                                     A=
                                        2 Ay By Cy
             height
                              B
     r         P
A
Distance Calculations
                                  AC • AB   r≺0 beyond A ↤
                             r=
                                   ∣AB∣2    r≻0 beyond B ↦

         C                                     1 Ax Bx Cx
                                            A=
                                               2 Ay By Cy
             height
                                     B
     r         P
                      base
A
Distance Calculations
                                  AC • AB   r≺0 beyond A ↤
                             r=
                                   ∣AB∣2    r≻0 beyond B ↦

         C                                     1 Ax Bx Cx
                                            A=
                                               2 Ay By Cy
             height
                                     B
               P                               base×height
     r
                                            A=
                      base                         2
A
Distance Calculations
                                  AC • AB   r≺0 beyond A ↤
                             r=
                                   ∣AB∣2    r≻0 beyond B ↦

         C                                     1 Ax Bx Cx
                                            A=
                                               2 Ay By Cy
             height
                                     B
               P                               base×height
     r
                                            A=
                      base                         2
A
                                            AP=rAB
1.override protected function updateLayer():void{
2. const model:Model = Model.instance;
3. graphics.clear();
4. graphics.lineStyle(1, 0);
5. model.streetGrid.search(map.extent, streetHandler);
6.}

8.private function streetHandler(street:Street, data:Object = null):void{
9. for each(var path:Array in street.shpPolyline.paths){
10.     var index:int = 0;
11.     var lastX:Number = toScreenX(path[index++]);
12.     var lastY:Number = toScreenY(path[index++]);
13.     graphics.moveTo(lastX, lastY);
14.     while(index < path.length){
15.        var currX:Number = toScreenX(path[index++]);
16.        var currY:Number = toScreenY(path[index++]);
17.        if( currX !== lastX || currY !== lastY){
18.            graphics.lineTo(currX, currY);
19.            lastX = currX;
20.            lastY = currY;
21.        }
22.     }
23. }
24.}
1.override protected function updateLayer():void{
2. const model:Model = Model.instance;
3. graphics.clear();
4. graphics.lineStyle(1, 0);
5. model.streetGrid.search(map.extent, streetHandler);
6.}

8.private function streetHandler(street:Street, data:Object = null):void{
9. for each(var path:Array in street.shpPolyline.paths){
10.     var index:int = 0;
11.     var lastX:Number = toScreenX(path[index++]);
12.     var lastY:Number = toScreenY(path[index++]);
13.     graphics.moveTo(lastX, lastY);
14.     while(index < path.length){
15.        var currX:Number = toScreenX(path[index++]);
16.        var currY:Number = toScreenY(path[index++]);
17.        if( currX !== lastX || currY !== lastY){
18.            graphics.lineTo(currX, currY);
19.            lastX = currX;
20.            lastY = currY;
21.        }
22.     }
23. }
24.}
1.override protected function updateLayer():void{
2. const model:Model = Model.instance;
3. graphics.clear();
4. graphics.lineStyle(1, 0);
5. model.streetGrid.search(map.extent, streetHandler);
6.}

8.private function streetHandler(street:Street, data:Object = null):void{
9. for each(var path:Array in street.shpPolyline.paths){
10.     var index:int = 0;
11.     var lastX:Number = toScreenX(path[index++]);
12.     var lastY:Number = toScreenY(path[index++]);
13.     graphics.moveTo(lastX, lastY);
14.     while(index < path.length){
15.        var currX:Number = toScreenX(path[index++]);
16.        var currY:Number = toScreenY(path[index++]);
17.        if( currX !== lastX || currY !== lastY){
18.            graphics.lineTo(currX, currY);
19.            lastX = currX;
20.            lastY = currY;
21.        }
22.     }
23. }
24.}
1.override protected function updateLayer():void{
2. const model:Model = Model.instance;
3. graphics.clear();
4. graphics.lineStyle(1, 0);
5. model.streetGrid.search(map.extent, streetHandler);
6.}

8.private function streetHandler(street:Street, data:Object = null):void{
9. for each(var path:Array in street.shpPolyline.paths){
10.     var index:int = 0;
11.     var lastX:Number = toScreenX(path[index++]);
12.     var lastY:Number = toScreenY(path[index++]);
13.     graphics.moveTo(lastX, lastY);
14.     while(index < path.length){
15.        var currX:Number = toScreenX(path[index++]);
16.        var currY:Number = toScreenY(path[index++]);
17.        if( currX !== lastX || currY !== lastY){
18.            graphics.lineTo(currX, currY);
19.            lastX = currX;
20.            lastY = currY;
21.        }
22.     }
23. }
24.}
1.override protected function updateLayer():void{
2. const model:Model = Model.instance;
3. graphics.clear();
4. graphics.lineStyle(1, 0);
5. model.streetGrid.search(map.extent, streetHandler);
6.}

8.private function streetHandler(street:Street, data:Object = null):void{
9. for each(var path:Array in street.shpPolyline.paths){
10.     var index:int = 0;
11.     var lastX:Number = toScreenX(path[index++]);
12.     var lastY:Number = toScreenY(path[index++]);
13.     graphics.moveTo(lastX, lastY);
14.     while(index < path.length){
15.        var currX:Number = toScreenX(path[index++]);
16.        var currY:Number = toScreenY(path[index++]);
17.        if( currX !== lastX || currY !== lastY){
18.            graphics.lineTo(currX, currY);
19.            lastX = currX;
20.            lastY = currY;
21.        }
22.     }
23. }
24.}
1.override protected function updateLayer():void{
2. const model:Model = Model.instance;
3. graphics.clear();
4. graphics.lineStyle(1, 0);
5. model.streetGrid.search(map.extent, streetHandler);
6.}

8.private function streetHandler(street:Street, data:Object = null):void{
9. for each(var path:Array in street.shpPolyline.paths){
10.     var index:int = 0;
11.     var lastX:Number = toScreenX(path[index++]);
12.     var lastY:Number = toScreenY(path[index++]);
13.     graphics.moveTo(lastX, lastY);
14.     while(index < path.length){
15.        var currX:Number = toScreenX(path[index++]);
16.        var currY:Number = toScreenY(path[index++]);
17.        if( currX !== lastX || currY !== lastY){
18.            graphics.lineTo(currX, currY);
19.            lastX = currX;
20.            lastY = currY;
21.        }
22.     }
23. }
24.}
Demo
StreetTrace
When Will I Use This ?
Q&A
http://thunderheadxpler.blogspot.com
           mraad@esri.com

More Related Content

Similar to Mansour Raad & Anthony Jayaprakash - Yet Another Mapping Framework, NOT!

Building Complex GUI Apps The Right Way. With Ample SDK - SWDC2010
Building Complex GUI Apps The Right Way. With Ample SDK - SWDC2010Building Complex GUI Apps The Right Way. With Ample SDK - SWDC2010
Building Complex GUI Apps The Right Way. With Ample SDK - SWDC2010Sergey Ilinsky
 
10 Things You're Not Doing [IBM Lotus Notes Domino Application Development]
10 Things You're Not Doing [IBM Lotus Notes Domino Application Development]10 Things You're Not Doing [IBM Lotus Notes Domino Application Development]
10 Things You're Not Doing [IBM Lotus Notes Domino Application Development]Chris Toohey
 
Microsoft ASP.NET 4.0 : What's Next?
Microsoft ASP.NET 4.0 : What's Next?Microsoft ASP.NET 4.0 : What's Next?
Microsoft ASP.NET 4.0 : What's Next?goodfriday
 
Rails 3 And The Real Secret To High Productivity Presentation
Rails 3 And The Real Secret To High Productivity PresentationRails 3 And The Real Secret To High Productivity Presentation
Rails 3 And The Real Secret To High Productivity Presentationrailsconf
 
Significant Characteristics In Planets Manfred Thaller
Significant Characteristics In Planets Manfred ThallerSignificant Characteristics In Planets Manfred Thaller
Significant Characteristics In Planets Manfred ThallerDigitalPreservationEurope
 
Beholding the giant pyramid of application development; why Ajax applications...
Beholding the giant pyramid of application development; why Ajax applications...Beholding the giant pyramid of application development; why Ajax applications...
Beholding the giant pyramid of application development; why Ajax applications...Javeline B.V.
 
JavaOne 2009 - 2d Vector Graphics in the browser with Canvas and SVG
JavaOne 2009 -  2d Vector Graphics in the browser with Canvas and SVGJavaOne 2009 -  2d Vector Graphics in the browser with Canvas and SVG
JavaOne 2009 - 2d Vector Graphics in the browser with Canvas and SVGPatrick Chanezon
 
Social Media Release Xml
Social Media Release XmlSocial Media Release Xml
Social Media Release XmlEcordia
 
Building Web Interface On Rails
Building Web Interface On RailsBuilding Web Interface On Rails
Building Web Interface On RailsWen-Tien Chang
 
BK2011 Utvikling av rike webapplikasjoner i microsoft silverlight
BK2011 Utvikling av rike webapplikasjoner i microsoft silverlightBK2011 Utvikling av rike webapplikasjoner i microsoft silverlight
BK2011 Utvikling av rike webapplikasjoner i microsoft silverlightGeodata AS
 
Preview Of “Preparation Tipitaka Recitation 2008 ”
Preview Of “Preparation Tipitaka Recitation 2008 ”Preview Of “Preparation Tipitaka Recitation 2008 ”
Preview Of “Preparation Tipitaka Recitation 2008 ”dhammasociety
 
Yahoo! Mail antispam - Bay area Hadoop user group
Yahoo! Mail antispam - Bay area Hadoop user groupYahoo! Mail antispam - Bay area Hadoop user group
Yahoo! Mail antispam - Bay area Hadoop user groupHadoop User Group
 
ESRI Developer Summit 2008 - Microsoft Virtual Earth
ESRI Developer Summit 2008 - Microsoft Virtual EarthESRI Developer Summit 2008 - Microsoft Virtual Earth
ESRI Developer Summit 2008 - Microsoft Virtual EarthChris Pendleton
 

Similar to Mansour Raad & Anthony Jayaprakash - Yet Another Mapping Framework, NOT! (20)

Building Complex GUI Apps The Right Way. With Ample SDK - SWDC2010
Building Complex GUI Apps The Right Way. With Ample SDK - SWDC2010Building Complex GUI Apps The Right Way. With Ample SDK - SWDC2010
Building Complex GUI Apps The Right Way. With Ample SDK - SWDC2010
 
10 Things You're Not Doing [IBM Lotus Notes Domino Application Development]
10 Things You're Not Doing [IBM Lotus Notes Domino Application Development]10 Things You're Not Doing [IBM Lotus Notes Domino Application Development]
10 Things You're Not Doing [IBM Lotus Notes Domino Application Development]
 
Merb jQuery
Merb jQueryMerb jQuery
Merb jQuery
 
Microsoft ASP.NET 4.0 : What's Next?
Microsoft ASP.NET 4.0 : What's Next?Microsoft ASP.NET 4.0 : What's Next?
Microsoft ASP.NET 4.0 : What's Next?
 
JQuery 101
JQuery 101JQuery 101
JQuery 101
 
Rails 3 And The Real Secret To High Productivity Presentation
Rails 3 And The Real Secret To High Productivity PresentationRails 3 And The Real Secret To High Productivity Presentation
Rails 3 And The Real Secret To High Productivity Presentation
 
Significant Characteristics In Planets Manfred Thaller
Significant Characteristics In Planets Manfred ThallerSignificant Characteristics In Planets Manfred Thaller
Significant Characteristics In Planets Manfred Thaller
 
Beholding the giant pyramid of application development; why Ajax applications...
Beholding the giant pyramid of application development; why Ajax applications...Beholding the giant pyramid of application development; why Ajax applications...
Beholding the giant pyramid of application development; why Ajax applications...
 
Ajax ons2
Ajax ons2Ajax ons2
Ajax ons2
 
Front End on Rails
Front End on RailsFront End on Rails
Front End on Rails
 
JavaOne 2009 - 2d Vector Graphics in the browser with Canvas and SVG
JavaOne 2009 -  2d Vector Graphics in the browser with Canvas and SVGJavaOne 2009 -  2d Vector Graphics in the browser with Canvas and SVG
JavaOne 2009 - 2d Vector Graphics in the browser with Canvas and SVG
 
Social Media Release Xml
Social Media Release XmlSocial Media Release Xml
Social Media Release Xml
 
Building Web Interface On Rails
Building Web Interface On RailsBuilding Web Interface On Rails
Building Web Interface On Rails
 
BK2011 Utvikling av rike webapplikasjoner i microsoft silverlight
BK2011 Utvikling av rike webapplikasjoner i microsoft silverlightBK2011 Utvikling av rike webapplikasjoner i microsoft silverlight
BK2011 Utvikling av rike webapplikasjoner i microsoft silverlight
 
Preview Of “Preparation Tipitaka Recitation 2008 ”
Preview Of “Preparation Tipitaka Recitation 2008 ”Preview Of “Preparation Tipitaka Recitation 2008 ”
Preview Of “Preparation Tipitaka Recitation 2008 ”
 
MongoDB
MongoDBMongoDB
MongoDB
 
02 create first-map
02 create first-map02 create first-map
02 create first-map
 
Wpf Workgroup 3
Wpf Workgroup 3Wpf Workgroup 3
Wpf Workgroup 3
 
Yahoo! Mail antispam - Bay area Hadoop user group
Yahoo! Mail antispam - Bay area Hadoop user groupYahoo! Mail antispam - Bay area Hadoop user group
Yahoo! Mail antispam - Bay area Hadoop user group
 
ESRI Developer Summit 2008 - Microsoft Virtual Earth
ESRI Developer Summit 2008 - Microsoft Virtual EarthESRI Developer Summit 2008 - Microsoft Virtual Earth
ESRI Developer Summit 2008 - Microsoft Virtual Earth
 

More from 360|Conferences

Metaio Mobile Augmented Reality
Metaio Mobile Augmented RealityMetaio Mobile Augmented Reality
Metaio Mobile Augmented Reality360|Conferences
 
Mobile Apps- Business Toolkit for the Manager
Mobile Apps- Business Toolkit for the ManagerMobile Apps- Business Toolkit for the Manager
Mobile Apps- Business Toolkit for the Manager360|Conferences
 
Making Real Money with Mobile Apps
Making Real Money with Mobile AppsMaking Real Money with Mobile Apps
Making Real Money with Mobile Apps360|Conferences
 
Inside Mobile Widgets Publish
Inside Mobile Widgets PublishInside Mobile Widgets Publish
Inside Mobile Widgets Publish360|Conferences
 
Ignite Denver 4 Master Deck
Ignite Denver 4 Master DeckIgnite Denver 4 Master Deck
Ignite Denver 4 Master Deck360|Conferences
 
Oğuz Demirkapı - Hands On Training: Creating Our First i18N Flex Application ...
Oğuz	Demirkapı - Hands On Training: Creating Our First i18N Flex Application ...Oğuz	Demirkapı - Hands On Training: Creating Our First i18N Flex Application ...
Oğuz Demirkapı - Hands On Training: Creating Our First i18N Flex Application ...360|Conferences
 
Tyler Wright - Undo History with Flight
Tyler Wright - Undo History with FlightTyler Wright - Undo History with Flight
Tyler Wright - Undo History with Flight360|Conferences
 
Chad Udell - Developers are from Mars, Designers are from Venus
Chad Udell - Developers are from Mars, Designers are from VenusChad Udell - Developers are from Mars, Designers are from Venus
Chad Udell - Developers are from Mars, Designers are from Venus360|Conferences
 
Erik Loehfelm - Experience Design with Flash Catalyst and Flex Gumbo
Erik Loehfelm - Experience Design with Flash Catalyst and Flex GumboErik Loehfelm - Experience Design with Flash Catalyst and Flex Gumbo
Erik Loehfelm - Experience Design with Flash Catalyst and Flex Gumbo360|Conferences
 
Ryan Phelan - Bending and Flexing
Ryan Phelan - Bending and FlexingRyan Phelan - Bending and Flexing
Ryan Phelan - Bending and Flexing360|Conferences
 
Giorgio Natilli - Blaze DS Connectivity Framework
Giorgio Natilli - Blaze DS Connectivity FrameworkGiorgio Natilli - Blaze DS Connectivity Framework
Giorgio Natilli - Blaze DS Connectivity Framework360|Conferences
 
Douglas Knudsen - Great Mash Up
Douglas Knudsen - Great Mash UpDouglas Knudsen - Great Mash Up
Douglas Knudsen - Great Mash Up360|Conferences
 
Wes Leonardo - Putting AIR into your Application
Wes Leonardo - Putting AIR into your ApplicationWes Leonardo - Putting AIR into your Application
Wes Leonardo - Putting AIR into your Application360|Conferences
 
Samuel Asher Rivello - PureMVC Hands On Part 1
Samuel Asher Rivello - PureMVC Hands On Part 1Samuel Asher Rivello - PureMVC Hands On Part 1
Samuel Asher Rivello - PureMVC Hands On Part 1360|Conferences
 
Adrian Pomilio - Flex Ajax Bridge and Legacy Applications
Adrian Pomilio - Flex Ajax Bridge and Legacy ApplicationsAdrian Pomilio - Flex Ajax Bridge and Legacy Applications
Adrian Pomilio - Flex Ajax Bridge and Legacy Applications360|Conferences
 
Samuel Asher Rivello - PureMVC Hands On Part 2
Samuel Asher Rivello - PureMVC Hands On Part 2Samuel Asher Rivello - PureMVC Hands On Part 2
Samuel Asher Rivello - PureMVC Hands On Part 2360|Conferences
 

More from 360|Conferences (20)

InsideMobile Keynote
InsideMobile KeynoteInsideMobile Keynote
InsideMobile Keynote
 
Metaio Mobile Augmented Reality
Metaio Mobile Augmented RealityMetaio Mobile Augmented Reality
Metaio Mobile Augmented Reality
 
Web Os Hands On
Web Os Hands OnWeb Os Hands On
Web Os Hands On
 
Mobile Apps- Business Toolkit for the Manager
Mobile Apps- Business Toolkit for the ManagerMobile Apps- Business Toolkit for the Manager
Mobile Apps- Business Toolkit for the Manager
 
Making Real Money with Mobile Apps
Making Real Money with Mobile AppsMaking Real Money with Mobile Apps
Making Real Money with Mobile Apps
 
Unlocking Android
Unlocking AndroidUnlocking Android
Unlocking Android
 
Inside Mobile Widgets Publish
Inside Mobile Widgets PublishInside Mobile Widgets Publish
Inside Mobile Widgets Publish
 
You Know WebOS
You Know WebOSYou Know WebOS
You Know WebOS
 
Ignite Denver 4 Master Deck
Ignite Denver 4 Master DeckIgnite Denver 4 Master Deck
Ignite Denver 4 Master Deck
 
Oğuz Demirkapı - Hands On Training: Creating Our First i18N Flex Application ...
Oğuz	Demirkapı - Hands On Training: Creating Our First i18N Flex Application ...Oğuz	Demirkapı - Hands On Training: Creating Our First i18N Flex Application ...
Oğuz Demirkapı - Hands On Training: Creating Our First i18N Flex Application ...
 
Tyler Wright - Undo History with Flight
Tyler Wright - Undo History with FlightTyler Wright - Undo History with Flight
Tyler Wright - Undo History with Flight
 
Chad Udell - Developers are from Mars, Designers are from Venus
Chad Udell - Developers are from Mars, Designers are from VenusChad Udell - Developers are from Mars, Designers are from Venus
Chad Udell - Developers are from Mars, Designers are from Venus
 
Erik Loehfelm - Experience Design with Flash Catalyst and Flex Gumbo
Erik Loehfelm - Experience Design with Flash Catalyst and Flex GumboErik Loehfelm - Experience Design with Flash Catalyst and Flex Gumbo
Erik Loehfelm - Experience Design with Flash Catalyst and Flex Gumbo
 
Ryan Phelan - Bending and Flexing
Ryan Phelan - Bending and FlexingRyan Phelan - Bending and Flexing
Ryan Phelan - Bending and Flexing
 
Giorgio Natilli - Blaze DS Connectivity Framework
Giorgio Natilli - Blaze DS Connectivity FrameworkGiorgio Natilli - Blaze DS Connectivity Framework
Giorgio Natilli - Blaze DS Connectivity Framework
 
Douglas Knudsen - Great Mash Up
Douglas Knudsen - Great Mash UpDouglas Knudsen - Great Mash Up
Douglas Knudsen - Great Mash Up
 
Wes Leonardo - Putting AIR into your Application
Wes Leonardo - Putting AIR into your ApplicationWes Leonardo - Putting AIR into your Application
Wes Leonardo - Putting AIR into your Application
 
Samuel Asher Rivello - PureMVC Hands On Part 1
Samuel Asher Rivello - PureMVC Hands On Part 1Samuel Asher Rivello - PureMVC Hands On Part 1
Samuel Asher Rivello - PureMVC Hands On Part 1
 
Adrian Pomilio - Flex Ajax Bridge and Legacy Applications
Adrian Pomilio - Flex Ajax Bridge and Legacy ApplicationsAdrian Pomilio - Flex Ajax Bridge and Legacy Applications
Adrian Pomilio - Flex Ajax Bridge and Legacy Applications
 
Samuel Asher Rivello - PureMVC Hands On Part 2
Samuel Asher Rivello - PureMVC Hands On Part 2Samuel Asher Rivello - PureMVC Hands On Part 2
Samuel Asher Rivello - PureMVC Hands On Part 2
 

Recently uploaded

GenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day PresentationGenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day PresentationMichael W. Hawkins
 
AI as an Interface for Commercial Buildings
AI as an Interface for Commercial BuildingsAI as an Interface for Commercial Buildings
AI as an Interface for Commercial BuildingsMemoori
 
My Hashitalk Indonesia April 2024 Presentation
My Hashitalk Indonesia April 2024 PresentationMy Hashitalk Indonesia April 2024 Presentation
My Hashitalk Indonesia April 2024 PresentationRidwan Fadjar
 
FULL ENJOY 🔝 8264348440 🔝 Call Girls in Diplomatic Enclave | Delhi
FULL ENJOY 🔝 8264348440 🔝 Call Girls in Diplomatic Enclave | DelhiFULL ENJOY 🔝 8264348440 🔝 Call Girls in Diplomatic Enclave | Delhi
FULL ENJOY 🔝 8264348440 🔝 Call Girls in Diplomatic Enclave | Delhisoniya singh
 
IAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI SolutionsIAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI SolutionsEnterprise Knowledge
 
Hyderabad Call Girls Khairatabad ✨ 7001305949 ✨ Cheap Price Your Budget
Hyderabad Call Girls Khairatabad ✨ 7001305949 ✨ Cheap Price Your BudgetHyderabad Call Girls Khairatabad ✨ 7001305949 ✨ Cheap Price Your Budget
Hyderabad Call Girls Khairatabad ✨ 7001305949 ✨ Cheap Price Your BudgetEnjoy Anytime
 
Presentation on how to chat with PDF using ChatGPT code interpreter
Presentation on how to chat with PDF using ChatGPT code interpreterPresentation on how to chat with PDF using ChatGPT code interpreter
Presentation on how to chat with PDF using ChatGPT code interpreternaman860154
 
Enhancing Worker Digital Experience: A Hands-on Workshop for Partners
Enhancing Worker Digital Experience: A Hands-on Workshop for PartnersEnhancing Worker Digital Experience: A Hands-on Workshop for Partners
Enhancing Worker Digital Experience: A Hands-on Workshop for PartnersThousandEyes
 
Beyond Boundaries: Leveraging No-Code Solutions for Industry Innovation
Beyond Boundaries: Leveraging No-Code Solutions for Industry InnovationBeyond Boundaries: Leveraging No-Code Solutions for Industry Innovation
Beyond Boundaries: Leveraging No-Code Solutions for Industry InnovationSafe Software
 
Kotlin Multiplatform & Compose Multiplatform - Starter kit for pragmatics
Kotlin Multiplatform & Compose Multiplatform - Starter kit for pragmaticsKotlin Multiplatform & Compose Multiplatform - Starter kit for pragmatics
Kotlin Multiplatform & Compose Multiplatform - Starter kit for pragmaticscarlostorres15106
 
Artificial intelligence in the post-deep learning era
Artificial intelligence in the post-deep learning eraArtificial intelligence in the post-deep learning era
Artificial intelligence in the post-deep learning eraDeakin University
 
Next-generation AAM aircraft unveiled by Supernal, S-A2
Next-generation AAM aircraft unveiled by Supernal, S-A2Next-generation AAM aircraft unveiled by Supernal, S-A2
Next-generation AAM aircraft unveiled by Supernal, S-A2Hyundai Motor Group
 
Unblocking The Main Thread Solving ANRs and Frozen Frames
Unblocking The Main Thread Solving ANRs and Frozen FramesUnblocking The Main Thread Solving ANRs and Frozen Frames
Unblocking The Main Thread Solving ANRs and Frozen FramesSinan KOZAK
 
08448380779 Call Girls In Greater Kailash - I Women Seeking Men
08448380779 Call Girls In Greater Kailash - I Women Seeking Men08448380779 Call Girls In Greater Kailash - I Women Seeking Men
08448380779 Call Girls In Greater Kailash - I Women Seeking MenDelhi Call girls
 
Key Features Of Token Development (1).pptx
Key  Features Of Token  Development (1).pptxKey  Features Of Token  Development (1).pptx
Key Features Of Token Development (1).pptxLBM Solutions
 
08448380779 Call Girls In Friends Colony Women Seeking Men
08448380779 Call Girls In Friends Colony Women Seeking Men08448380779 Call Girls In Friends Colony Women Seeking Men
08448380779 Call Girls In Friends Colony Women Seeking MenDelhi Call girls
 
WhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure service
WhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure serviceWhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure service
WhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure servicePooja Nehwal
 
Injustice - Developers Among Us (SciFiDevCon 2024)
Injustice - Developers Among Us (SciFiDevCon 2024)Injustice - Developers Among Us (SciFiDevCon 2024)
Injustice - Developers Among Us (SciFiDevCon 2024)Allon Mureinik
 
Pigging Solutions Piggable Sweeping Elbows
Pigging Solutions Piggable Sweeping ElbowsPigging Solutions Piggable Sweeping Elbows
Pigging Solutions Piggable Sweeping ElbowsPigging Solutions
 
Transcript: #StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
Transcript: #StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024Transcript: #StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
Transcript: #StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024BookNet Canada
 

Recently uploaded (20)

GenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day PresentationGenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day Presentation
 
AI as an Interface for Commercial Buildings
AI as an Interface for Commercial BuildingsAI as an Interface for Commercial Buildings
AI as an Interface for Commercial Buildings
 
My Hashitalk Indonesia April 2024 Presentation
My Hashitalk Indonesia April 2024 PresentationMy Hashitalk Indonesia April 2024 Presentation
My Hashitalk Indonesia April 2024 Presentation
 
FULL ENJOY 🔝 8264348440 🔝 Call Girls in Diplomatic Enclave | Delhi
FULL ENJOY 🔝 8264348440 🔝 Call Girls in Diplomatic Enclave | DelhiFULL ENJOY 🔝 8264348440 🔝 Call Girls in Diplomatic Enclave | Delhi
FULL ENJOY 🔝 8264348440 🔝 Call Girls in Diplomatic Enclave | Delhi
 
IAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI SolutionsIAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI Solutions
 
Hyderabad Call Girls Khairatabad ✨ 7001305949 ✨ Cheap Price Your Budget
Hyderabad Call Girls Khairatabad ✨ 7001305949 ✨ Cheap Price Your BudgetHyderabad Call Girls Khairatabad ✨ 7001305949 ✨ Cheap Price Your Budget
Hyderabad Call Girls Khairatabad ✨ 7001305949 ✨ Cheap Price Your Budget
 
Presentation on how to chat with PDF using ChatGPT code interpreter
Presentation on how to chat with PDF using ChatGPT code interpreterPresentation on how to chat with PDF using ChatGPT code interpreter
Presentation on how to chat with PDF using ChatGPT code interpreter
 
Enhancing Worker Digital Experience: A Hands-on Workshop for Partners
Enhancing Worker Digital Experience: A Hands-on Workshop for PartnersEnhancing Worker Digital Experience: A Hands-on Workshop for Partners
Enhancing Worker Digital Experience: A Hands-on Workshop for Partners
 
Beyond Boundaries: Leveraging No-Code Solutions for Industry Innovation
Beyond Boundaries: Leveraging No-Code Solutions for Industry InnovationBeyond Boundaries: Leveraging No-Code Solutions for Industry Innovation
Beyond Boundaries: Leveraging No-Code Solutions for Industry Innovation
 
Kotlin Multiplatform & Compose Multiplatform - Starter kit for pragmatics
Kotlin Multiplatform & Compose Multiplatform - Starter kit for pragmaticsKotlin Multiplatform & Compose Multiplatform - Starter kit for pragmatics
Kotlin Multiplatform & Compose Multiplatform - Starter kit for pragmatics
 
Artificial intelligence in the post-deep learning era
Artificial intelligence in the post-deep learning eraArtificial intelligence in the post-deep learning era
Artificial intelligence in the post-deep learning era
 
Next-generation AAM aircraft unveiled by Supernal, S-A2
Next-generation AAM aircraft unveiled by Supernal, S-A2Next-generation AAM aircraft unveiled by Supernal, S-A2
Next-generation AAM aircraft unveiled by Supernal, S-A2
 
Unblocking The Main Thread Solving ANRs and Frozen Frames
Unblocking The Main Thread Solving ANRs and Frozen FramesUnblocking The Main Thread Solving ANRs and Frozen Frames
Unblocking The Main Thread Solving ANRs and Frozen Frames
 
08448380779 Call Girls In Greater Kailash - I Women Seeking Men
08448380779 Call Girls In Greater Kailash - I Women Seeking Men08448380779 Call Girls In Greater Kailash - I Women Seeking Men
08448380779 Call Girls In Greater Kailash - I Women Seeking Men
 
Key Features Of Token Development (1).pptx
Key  Features Of Token  Development (1).pptxKey  Features Of Token  Development (1).pptx
Key Features Of Token Development (1).pptx
 
08448380779 Call Girls In Friends Colony Women Seeking Men
08448380779 Call Girls In Friends Colony Women Seeking Men08448380779 Call Girls In Friends Colony Women Seeking Men
08448380779 Call Girls In Friends Colony Women Seeking Men
 
WhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure service
WhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure serviceWhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure service
WhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure service
 
Injustice - Developers Among Us (SciFiDevCon 2024)
Injustice - Developers Among Us (SciFiDevCon 2024)Injustice - Developers Among Us (SciFiDevCon 2024)
Injustice - Developers Among Us (SciFiDevCon 2024)
 
Pigging Solutions Piggable Sweeping Elbows
Pigging Solutions Piggable Sweeping ElbowsPigging Solutions Piggable Sweeping Elbows
Pigging Solutions Piggable Sweeping Elbows
 
Transcript: #StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
Transcript: #StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024Transcript: #StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
Transcript: #StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
 

Mansour Raad & Anthony Jayaprakash - Yet Another Mapping Framework, NOT!

  • 1. Yet Another Mapping API - Not ! Mansour Raad mraad@esri.com
  • 2.
  • 3.
  • 6.
  • 7.
  • 8. ArcGIS Services • Map Tiles ESRI / Virtual Earth (token) • Geocoding / Reverse • Query / Identify • Routing with Barriers and Time Windows • Buffer / Projection • GeoProcessing
  • 9. You & ArcGIS Blaze PHP Local AGS .Net
  • 11. Map “Hello World” 1.<?xml version=quot;1.0quot; encoding=quot;utf-8quot;?> 2.<mx:Application 3. xmlns:mx=quot;http://www.adobe.com/2006/mxmlquot; 4. xmlns:esri=quot;http://www.esri.com/2008/agsquot; 5. layout=quot;absolutequot; 6. > 7. <esri:Map id=quot;mapquot;> 8. <esri:ArcGISTiledMapServiceLayer url=”http://host/rest/map”/> 9. </esri:Map> 10.</mx:Application>
  • 12. Map “Hello World” 1.<?xml version=quot;1.0quot; encoding=quot;utf-8quot;?> 2.<mx:Application 3. xmlns:mx=quot;http://www.adobe.com/2006/mxmlquot; 4. xmlns:esri=quot;http://www.esri.com/2008/agsquot; 5. layout=quot;absolutequot; 6. > 7. <esri:Map id=quot;mapquot;> 8. <esri:ArcGISTiledMapServiceLayer url=”http://host/rest/map”/> 9. </esri:Map> 10.</mx:Application>
  • 13. 1.<?xml version=quot;1.0quot; encoding=quot;utf-8quot;?> 2.<mx:Application 3. xmlns:mx=quot;http://www.adobe.com/2006/mxmlquot; 4. xmlns:esri=quot;http://www.esri.com/2008/agsquot; 5. layout=quot;absolutequot; 6. > 7. <esri:Map id=quot;mapquot; openHandCursorVisible=quot;falsequot; zoomSliderVisible=quot;falsequot;> 8. <esri:ArcGISTiledMapServiceLayer id=quot;layerquot; url=quot;{cb.selectedItem.url}quot;/> 9. </esri:Map> 10. <mx:ComboBox id=quot;cbquot; dataProvider=quot;{[ 11. {label:'Imagery',url:'http://host/rest/Image'}, 12. {label:'Physical',url:'http://host/rest/Physical'} 13. ]}quot;/> 14.</mx:Application>
  • 14. 1.<?xml version=quot;1.0quot; encoding=quot;utf-8quot;?> 2.<mx:Application 3. xmlns:mx=quot;http://www.adobe.com/2006/mxmlquot; 4. xmlns:esri=quot;http://www.esri.com/2008/agsquot; 5. layout=quot;absolutequot; 6. > 7. <esri:Map id=quot;mapquot; openHandCursorVisible=quot;falsequot; zoomSliderVisible=quot;falsequot;> 8. <esri:ArcGISTiledMapServiceLayer id=quot;layerquot; url=quot;{cb.selectedItem.url}quot;/> 9. </esri:Map> 10. <mx:ComboBox id=quot;cbquot; dataProvider=quot;{[ 11. {label:'Imagery',url:'http://host/rest/Image'}, 12. {label:'Physical',url:'http://host/rest/Physical'} 13. ]}quot;/> 14.</mx:Application>
  • 15. 1.<?xml version=quot;1.0quot; encoding=quot;utf-8quot;?> 2.<mx:Application 3. xmlns:mx=quot;http://www.adobe.com/2006/mxmlquot; 4. xmlns:esri=quot;http://www.esri.com/2008/agsquot; 5. layout=quot;absolutequot; 6. > 7. <esri:Map id=quot;mapquot; openHandCursorVisible=quot;falsequot; zoomSliderVisible=quot;falsequot;> 8. <esri:ArcGISTiledMapServiceLayer id=quot;layerquot; url=quot;{cb.selectedItem.url}quot;/> 9. </esri:Map> 10. <mx:ComboBox id=quot;cbquot; dataProvider=quot;{[ 11. {label:'Imagery',url:'http://host/rest/Image'}, 12. {label:'Physical',url:'http://host/rest/Physical'} 13. ]}quot;/> 14.</mx:Application>
  • 17.
  • 18.
  • 19.
  • 20.
  • 21. 1. <esri:Geoprocessor id=quot;gpquot; url=quot;<GeoProcessesorURL>quot; showBusyCursor=quot;truequot;/> 2. <esri:Map id=quot;mapquot; openHandCursorVisible=quot;falsequot; mapClick=quot;mapClickHandler(event)quot;> 3. <esri:extent> 4. <esri:Extent xmin=quot;-95.41quot; ymin=quot;38.86quot; xmax=quot;-95.1quot; ymax=quot;39.06quot;> 5. <esri:SpatialReference wkid=quot;4326quot;/> 6. </esri:Extent> 7. </esri:extent> 8. <esri:ArcGISTiledMapServiceLayer url=quot;<MapServiceURL>quot;/> 9. <esri:GraphicsLayer id=quot;polygonLayerquot; graphicProvider=quot;{gp.executeFirstFeatureSet.features}quot;> 10. <esri:renderer> 11. <esri:UniqueValueRenderer attribute=quot;ToBreakquot;> 12. <esri:UniqueValueInfo value=quot;1quot;> 13. <esri:symbol> 14. <esri:SimpleFillSymbol alpha=quot;0.5quot; color=quot;0xFF0000quot;/> 15. </esri:symbol> 16. </esri:UniqueValueInfo> 17. <esri:UniqueValueInfo value=quot;2quot;> 18. <esri:symbol> 19. <esri:SimpleFillSymbol alpha=quot;0.5quot; color=quot;0x00FF00quot;/> 20. </esri:symbol> 21. </esri:UniqueValueInfo> 22. <esri:UniqueValueInfo value=quot;3quot;> 23. <esri:symbol> 24. <esri:SimpleFillSymbol alpha=quot;0.5quot; color=quot;0x0000FFquot;/> 25. </esri:symbol> 26. </esri:UniqueValueInfo> 27. </esri:UniqueValueRenderer> 28. </esri:renderer> 29. </esri:GraphicsLayer> 30. <esri:GraphicsLayer id=quot;pointLayerquot;/> 31. </esri:Map>
  • 22. 1. <esri:Geoprocessor id=quot;gpquot; url=quot;<GeoProcessesorURL>quot; showBusyCursor=quot;truequot;/> 2. <esri:Map id=quot;mapquot; openHandCursorVisible=quot;falsequot; mapClick=quot;mapClickHandler(event)quot;> 3. <esri:extent> 4. <esri:Extent xmin=quot;-95.41quot; ymin=quot;38.86quot; xmax=quot;-95.1quot; ymax=quot;39.06quot;> 5. <esri:SpatialReference wkid=quot;4326quot;/> 6. </esri:Extent> 7. </esri:extent> 8. <esri:ArcGISTiledMapServiceLayer url=quot;<MapServiceURL>quot;/> 9. <esri:GraphicsLayer id=quot;polygonLayerquot; graphicProvider=quot;{gp.executeFirstFeatureSet.features}quot;> 10. <esri:renderer> 11. <esri:UniqueValueRenderer attribute=quot;ToBreakquot;> 12. <esri:UniqueValueInfo value=quot;1quot;> 13. <esri:symbol> 14. <esri:SimpleFillSymbol alpha=quot;0.5quot; color=quot;0xFF0000quot;/> 15. </esri:symbol> 16. </esri:UniqueValueInfo> 17. <esri:UniqueValueInfo value=quot;2quot;> 18. <esri:symbol> 19. <esri:SimpleFillSymbol alpha=quot;0.5quot; color=quot;0x00FF00quot;/> 20. </esri:symbol> 21. </esri:UniqueValueInfo> 22. <esri:UniqueValueInfo value=quot;3quot;> 23. <esri:symbol> 24. <esri:SimpleFillSymbol alpha=quot;0.5quot; color=quot;0x0000FFquot;/> 25. </esri:symbol> 26. </esri:UniqueValueInfo> 27. </esri:UniqueValueRenderer> 28. </esri:renderer> 29. </esri:GraphicsLayer> 30. <esri:GraphicsLayer id=quot;pointLayerquot;/> 31. </esri:Map>
  • 23. 1. <esri:Geoprocessor id=quot;gpquot; url=quot;<GeoProcessesorURL>quot; showBusyCursor=quot;truequot;/> 2. <esri:Map id=quot;mapquot; openHandCursorVisible=quot;falsequot; mapClick=quot;mapClickHandler(event)quot;> 3. <esri:extent> 4. <esri:Extent xmin=quot;-95.41quot; ymin=quot;38.86quot; xmax=quot;-95.1quot; ymax=quot;39.06quot;> 5. <esri:SpatialReference wkid=quot;4326quot;/> 6. </esri:Extent> 7. </esri:extent> 8. <esri:ArcGISTiledMapServiceLayer url=quot;<MapServiceURL>quot;/> 9. <esri:GraphicsLayer id=quot;polygonLayerquot; graphicProvider=quot;{gp.executeFirstFeatureSet.features}quot;> 10. <esri:renderer> 11. <esri:UniqueValueRenderer attribute=quot;ToBreakquot;> 12. <esri:UniqueValueInfo value=quot;1quot;> 13. <esri:symbol> 14. <esri:SimpleFillSymbol alpha=quot;0.5quot; color=quot;0xFF0000quot;/> 15. </esri:symbol> 16. </esri:UniqueValueInfo> 17. <esri:UniqueValueInfo value=quot;2quot;> 18. <esri:symbol> 19. <esri:SimpleFillSymbol alpha=quot;0.5quot; color=quot;0x00FF00quot;/> 20. </esri:symbol> 21. </esri:UniqueValueInfo> 22. <esri:UniqueValueInfo value=quot;3quot;> 23. <esri:symbol> 24. <esri:SimpleFillSymbol alpha=quot;0.5quot; color=quot;0x0000FFquot;/> 25. </esri:symbol> 26. </esri:UniqueValueInfo> 27. </esri:UniqueValueRenderer> 28. </esri:renderer> 29. </esri:GraphicsLayer> 30. <esri:GraphicsLayer id=quot;pointLayerquot;/> 31. </esri:Map>
  • 24. 1. <esri:Geoprocessor id=quot;gpquot; url=quot;<GeoProcessesorURL>quot; showBusyCursor=quot;truequot;/> 2. <esri:Map id=quot;mapquot; openHandCursorVisible=quot;falsequot; mapClick=quot;mapClickHandler(event)quot;> 3. <esri:extent> 4. <esri:Extent xmin=quot;-95.41quot; ymin=quot;38.86quot; xmax=quot;-95.1quot; ymax=quot;39.06quot;> 5. <esri:SpatialReference wkid=quot;4326quot;/> 6. </esri:Extent> 7. </esri:extent> 8. <esri:ArcGISTiledMapServiceLayer url=quot;<MapServiceURL>quot;/> 9. <esri:GraphicsLayer id=quot;polygonLayerquot; graphicProvider=quot;{gp.executeFirstFeatureSet.features}quot;> 10. <esri:renderer> 11. <esri:UniqueValueRenderer attribute=quot;ToBreakquot;> 12. <esri:UniqueValueInfo value=quot;1quot;> 13. <esri:symbol> 14. <esri:SimpleFillSymbol alpha=quot;0.5quot; color=quot;0xFF0000quot;/> 15. </esri:symbol> 16. </esri:UniqueValueInfo> 17. <esri:UniqueValueInfo value=quot;2quot;> 18. <esri:symbol> 19. <esri:SimpleFillSymbol alpha=quot;0.5quot; color=quot;0x00FF00quot;/> 20. </esri:symbol> 21. </esri:UniqueValueInfo> 22. <esri:UniqueValueInfo value=quot;3quot;> 23. <esri:symbol> 24. <esri:SimpleFillSymbol alpha=quot;0.5quot; color=quot;0x0000FFquot;/> 25. </esri:symbol> 26. </esri:UniqueValueInfo> 27. </esri:UniqueValueRenderer> 28. </esri:renderer> 29. </esri:GraphicsLayer> 30. <esri:GraphicsLayer id=quot;pointLayerquot;/> 31. </esri:Map>
  • 25. 1.<mx:Script> 2. <![CDATA[ 3. import com.esri.ags.tasks.FeatureSet; 4. import com.esri.ags.Graphic; 5. import com.esri.ags.events.MapMouseEvent; 7. private function mapClickHandler(event:MapMouseEvent):void 8. { 9. const graphic:Graphic = new Graphic(event.mapPoint); 10. pointLayer.clear(); 11. pointLayer.add(graphic); 12. const featureSet:FeatureSet = new FeatureSet([graphic]); 13. gp.execute({quot;Input_Locationquot;: featureSet, quot;Drive_Timesquot;: quot;1 2 3quot;}); 14. } 15. ]]> 16.</mx:Script>
  • 26. 1.<mx:Script> 2. <![CDATA[ 3. import com.esri.ags.tasks.FeatureSet; 4. import com.esri.ags.Graphic; 5. import com.esri.ags.events.MapMouseEvent; 7. private function mapClickHandler(event:MapMouseEvent):void 8. { 9. const graphic:Graphic = new Graphic(event.mapPoint); 10. pointLayer.clear(); 11. pointLayer.add(graphic); 12. const featureSet:FeatureSet = new FeatureSet([graphic]); 13. gp.execute({quot;Input_Locationquot;: featureSet, quot;Drive_Timesquot;: quot;1 2 3quot;}); 14. } 15. ]]> 16.</mx:Script>
  • 31. GraphicLayer • graphicProvider • ArrayCollection • renderer • graphic with no symbol
  • 33. Graphic • UIComponent • Flex life cycle management • geometry • symbol • attributes
  • 35. Graphic/Geometry • Geometry - base class • MapPoint • Polyline • Polygon
  • 37. Polyline/Polygon • Multi Part Geometry • Islands of Hawaii
  • 39. Graphic/Symbol • Symbol - base class • Draws geometry of Graphic • Uses Flash Drawing API
  • 41. Graphic/Attributes • Any Object ! • Attach any dynamic property to Graphic
  • 45. LCDS
  • 46. LCDS • Remote Objects • Messaging • Data Services
  • 48. Feature • Serializable server side object • Properties • featureID:int; • geometry:IGeometry; • attributes:ASObject;
  • 49. public class Feature implements Serializable { private int m_featureId; private IGeometry m_geometry; private ASObject m_attributes; public Feature() { } public int getFeatureId() { return m_featureId; } public void setFeatureId(final int featureId) { m_featureId = featureId; } ...
  • 50. public class MapPoint implements IGeometry { private double m_x; private double m_y; private SpatialReference m_spatialReference; public MapPoint(){ } public MapPoint(final double x, final double y){ m_x = x; m_y = y; } public double getX(){ return m_x; } public void setX(final double x){ m_x = x; } ...
  • 51. DS Assembler • fill • createItem • getItem • updateItem • deleteItem
  • 52. private int m_featureId = 1; private Map<Integer, Feature> m_map = new ConcurrentHashMap<Integer, Feature>(17); public Collection fill(final List fillParameters) { return m_map.values(); } public Object getItem(final Map map) { return m_map.get(map.get(quot;featureIdquot;)); } public void createItem(final Object newVersion) { final Feature Feature = (Feature) newVersion; Feature.setFeatureId(m_featureId++); m_map.put(Feature.getFeatureId(), Feature); } public void updateItem(final Object newVersion, final Object prevVersion, final List changes) { final Feature Feature = (Feature) newVersion; m_map.put(Feature.getFeatureId(), Feature); } public void deleteItem(final Object prevVersion) { final Feature Feature = (Feature) prevVersion; m_map.remove(Feature.getFeatureId()); }
  • 53. private int m_featureId = 1; private Map<Integer, Feature> m_map = new ConcurrentHashMap<Integer, Feature>(17); public Collection fill(final List fillParameters) { return m_map.values(); } public Object getItem(final Map map) { return m_map.get(map.get(quot;featureIdquot;)); } public void createItem(final Object newVersion) { final Feature Feature = (Feature) newVersion; Feature.setFeatureId(m_featureId++); m_map.put(Feature.getFeatureId(), Feature); } public void updateItem(final Object newVersion, final Object prevVersion, final List changes) { final Feature Feature = (Feature) newVersion; m_map.put(Feature.getFeatureId(), Feature); } public void deleteItem(final Object prevVersion) { final Feature Feature = (Feature) prevVersion; m_map.remove(Feature.getFeatureId()); }
  • 54. private int m_featureId = 1; private Map<Integer, Feature> m_map = new ConcurrentHashMap<Integer, Feature>(17); public Collection fill(final List fillParameters) { return m_map.values(); } public Object getItem(final Map map) { return m_map.get(map.get(quot;featureIdquot;)); } public void createItem(final Object newVersion) { final Feature Feature = (Feature) newVersion; Feature.setFeatureId(m_featureId++); m_map.put(Feature.getFeatureId(), Feature); } public void updateItem(final Object newVersion, final Object prevVersion, final List changes) { final Feature Feature = (Feature) newVersion; m_map.put(Feature.getFeatureId(), Feature); } public void deleteItem(final Object prevVersion) { final Feature Feature = (Feature) prevVersion; m_map.remove(Feature.getFeatureId()); }
  • 55. private int m_featureId = 1; private Map<Integer, Feature> m_map = new ConcurrentHashMap<Integer, Feature>(17); public Collection fill(final List fillParameters) { return m_map.values(); } public Object getItem(final Map map) { return m_map.get(map.get(quot;featureIdquot;)); } public void createItem(final Object newVersion) { final Feature Feature = (Feature) newVersion; Feature.setFeatureId(m_featureId++); m_map.put(Feature.getFeatureId(), Feature); } public void updateItem(final Object newVersion, final Object prevVersion, final List changes) { final Feature Feature = (Feature) newVersion; m_map.put(Feature.getFeatureId(), Feature); } public void deleteItem(final Object prevVersion) { final Feature Feature = (Feature) prevVersion; m_map.remove(Feature.getFeatureId()); }
  • 56. private int m_featureId = 1; private Map<Integer, Feature> m_map = new ConcurrentHashMap<Integer, Feature>(17); public Collection fill(final List fillParameters) { return m_map.values(); } public Object getItem(final Map map) { return m_map.get(map.get(quot;featureIdquot;)); } public void createItem(final Object newVersion) { final Feature Feature = (Feature) newVersion; Feature.setFeatureId(m_featureId++); m_map.put(Feature.getFeatureId(), Feature); } public void updateItem(final Object newVersion, final Object prevVersion, final List changes) { final Feature Feature = (Feature) newVersion; m_map.put(Feature.getFeatureId(), Feature); } public void deleteItem(final Object prevVersion) { final Feature Feature = (Feature) prevVersion; m_map.remove(Feature.getFeatureId()); }
  • 57. private int m_featureId = 1; private Map<Integer, Feature> m_map = new ConcurrentHashMap<Integer, Feature>(17); public Collection fill(final List fillParameters) { return m_map.values(); } public Object getItem(final Map map) { return m_map.get(map.get(quot;featureIdquot;)); } public void createItem(final Object newVersion) { final Feature Feature = (Feature) newVersion; Feature.setFeatureId(m_featureId++); m_map.put(Feature.getFeatureId(), Feature); } public void updateItem(final Object newVersion, final Object prevVersion, final List changes) { final Feature Feature = (Feature) newVersion; m_map.put(Feature.getFeatureId(), Feature); } public void deleteItem(final Object prevVersion) { final Feature Feature = (Feature) prevVersion; m_map.remove(Feature.getFeatureId()); }
  • 59. data-management-config.xml <destination id=quot;featurequot;> <properties> <factory>spring</factory> <source>featureAssembler</source> <scope>application</scope> <use-transactions>false</use-transactions> <metadata> <identity property=quot;featureIdquot;/> </metadata> <network> <paging enabled=quot;falsequot; pageSize=quot;10quot;/> </network> </properties> </destination>
  • 60. Back To The Client :-)
  • 61. package com.esri.cats { import com.esri.ags.SpatialReference; import com.esri.ags.geometry.MapPoint; import flash.net.registerClassAlias; import mx.core.IMXMLObject; public class ClassAliasRegistry implements IMXMLObject { public function initialized(document:Object, id:String):void { registerClassAlias(quot;com.esri.cats.MapPointquot;, MapPoint); registerClassAlias(quot;com.esri.cats.SpatialReferencequot;, SpatialReference); } } }
  • 62. package com.esri.cats { import com.esri.ags.SpatialReference; import com.esri.ags.geometry.MapPoint; import flash.net.registerClassAlias; import mx.core.IMXMLObject; public class ClassAliasRegistry implements IMXMLObject { public function initialized(document:Object, id:String):void { registerClassAlias(quot;com.esri.cats.MapPointquot;, MapPoint); registerClassAlias(quot;com.esri.cats.SpatialReferencequot;, SpatialReference); } } }
  • 63. 1.package com.esri.cats 2.{ 3. import com.esri.ags.geometry.Geometry; 5. [Managed] 6. [RemoteClass(alias=quot;com.esri.cats.Featurequot;)] 7. public class Feature 8. { 9. public var featureId:int; 10. public var geometry:Geometry; 11. public var attributes:Object; 12. 13. public function Feature() 14. { 15. } 16. 17. } 18.}
  • 64. 1.package com.esri.cats 2.{ 3. import com.esri.ags.geometry.Geometry; 5. [Managed] 6. [RemoteClass(alias=quot;com.esri.cats.Featurequot;)] 7. public class Feature 8. { 9. public var featureId:int; 10. public var geometry:Geometry; 11. public var attributes:Object; 12. 13. public function Feature() 14. { 15. } 16. 17. } 18.}
  • 65. 1.<cats:ClassAliasRegistry/> 2.<mx:ArrayCollection id=quot;featuresquot; 3. collectionChange=quot;collectionChangeHandler(event)quot;/> 4.<mx:DataService id=quot;dsquot; destination=quot;featurequot;/> 5.<esri:Map id=quot;mapquot; load=quot;ds.fill(features)quot;> 6. <esri:GraphicsLayer id=quot;graphicsLayerquot;/> 7. <esri:GraphicsLayer id=quot;pointLayerquot;> 8. <esri:symbol> 9. <esri:SimpleMarkerSymbol color=quot;0xFFFF00quot;/> 10. </esri:symbol> 11. </esri:GraphicsLayer> 12.</esri:Map>
  • 66. 1.<cats:ClassAliasRegistry/> 2.<mx:ArrayCollection id=quot;featuresquot; 3. collectionChange=quot;collectionChangeHandler(event)quot;/> 4.<mx:DataService id=quot;dsquot; destination=quot;featurequot;/> 5.<esri:Map id=quot;mapquot; load=quot;ds.fill(features)quot;> 6. <esri:GraphicsLayer id=quot;graphicsLayerquot;/> 7. <esri:GraphicsLayer id=quot;pointLayerquot;> 8. <esri:symbol> 9. <esri:SimpleMarkerSymbol color=quot;0xFFFF00quot;/> 10. </esri:symbol> 11. </esri:GraphicsLayer> 12.</esri:Map>
  • 67. 1.<cats:ClassAliasRegistry/> 2.<mx:ArrayCollection id=quot;featuresquot; 3. collectionChange=quot;collectionChangeHandler(event)quot;/> 4.<mx:DataService id=quot;dsquot; destination=quot;featurequot;/> 5.<esri:Map id=quot;mapquot; load=quot;ds.fill(features)quot;> 6. <esri:GraphicsLayer id=quot;graphicsLayerquot;/> 7. <esri:GraphicsLayer id=quot;pointLayerquot;> 8. <esri:symbol> 9. <esri:SimpleMarkerSymbol color=quot;0xFFFF00quot;/> 10. </esri:symbol> 11. </esri:GraphicsLayer> 12.</esri:Map>
  • 68. 1.<cats:ClassAliasRegistry/> 2.<mx:ArrayCollection id=quot;featuresquot; 3. collectionChange=quot;collectionChangeHandler(event)quot;/> 4.<mx:DataService id=quot;dsquot; destination=quot;featurequot;/> 5.<esri:Map id=quot;mapquot; load=quot;ds.fill(features)quot;> 6. <esri:GraphicsLayer id=quot;graphicsLayerquot;/> 7. <esri:GraphicsLayer id=quot;pointLayerquot;> 8. <esri:symbol> 9. <esri:SimpleMarkerSymbol color=quot;0xFFFF00quot;/> 10. </esri:symbol> 11. </esri:GraphicsLayer> 12.</esri:Map>
  • 69. 1.<cats:ClassAliasRegistry/> 2.<mx:ArrayCollection id=quot;featuresquot; 3. collectionChange=quot;collectionChangeHandler(event)quot;/> 4.<mx:DataService id=quot;dsquot; destination=quot;featurequot;/> 5.<esri:Map id=quot;mapquot; load=quot;ds.fill(features)quot;> 6. <esri:GraphicsLayer id=quot;graphicsLayerquot;/> 7. <esri:GraphicsLayer id=quot;pointLayerquot;> 8. <esri:symbol> 9. <esri:SimpleMarkerSymbol color=quot;0xFFFF00quot;/> 10. </esri:symbol> 11. </esri:GraphicsLayer> 12.</esri:Map>
  • 70. private function collectionChangeHandler(event:CollectionEvent):void { switch (event.kind) { case CollectionEventKind.RESET: doReset(event); break; case CollectionEventKind.UPDATE: doUpdate(event); break; } }
  • 71. private function doReset(event:CollectionEvent):void { graphicsLayer.clear(); m_graphicsDict = new Dictionary(); for each (var feature:Feature in features) { var graphic:Graphic = new Graphic(feature.geometry, null, feature); graphic.buttonMode = true; graphic.addEventListener(MouseEvent.MOUSE_DOWN, mouseDownHandler); graphic.toolTip = String(feature.attributes.coords).replace(quot; quot;, quot;nquot;); graphicsLayer.add(graphic); m_graphicsDict[feature.featureId] = graphic; } }
  • 72. private function doReset(event:CollectionEvent):void { graphicsLayer.clear(); m_graphicsDict = new Dictionary(); for each (var feature:Feature in features) { var graphic:Graphic = new Graphic(feature.geometry, null, feature); graphic.buttonMode = true; graphic.addEventListener(MouseEvent.MOUSE_DOWN, mouseDownHandler); graphic.toolTip = String(feature.attributes.coords).replace(quot; quot;, quot;nquot;); graphicsLayer.add(graphic); m_graphicsDict[feature.featureId] = graphic; } }
  • 73. private function doReset(event:CollectionEvent):void { graphicsLayer.clear(); m_graphicsDict = new Dictionary(); for each (var feature:Feature in features) { var graphic:Graphic = new Graphic(feature.geometry, null, feature); graphic.buttonMode = true; graphic.addEventListener(MouseEvent.MOUSE_DOWN, mouseDownHandler); graphic.toolTip = String(feature.attributes.coords).replace(quot; quot;, quot;nquot;); graphicsLayer.add(graphic); m_graphicsDict[feature.featureId] = graphic; } }
  • 74. private function doUpdate(event:CollectionEvent):void { for each (var propertyChangeEvent:PropertyChangeEvent in event.items) { var feature:Feature = propertyChangeEvent.target as Feature; if (propertyChangeEvent.property === quot;geometryquot;) { var graphic:Graphic = m_graphicsDict[feature.featureId]; if (graphic) { graphic.geometry = feature.geometry; } } } }
  • 75. private function doUpdate(event:CollectionEvent):void { for each (var propertyChangeEvent:PropertyChangeEvent in event.items) { var feature:Feature = propertyChangeEvent.target as Feature; if (propertyChangeEvent.property === quot;geometryquot;) { var graphic:Graphic = m_graphicsDict[feature.featureId]; if (graphic) { graphic.geometry = feature.geometry; } } } }
  • 76. private function doUpdate(event:CollectionEvent):void { for each (var propertyChangeEvent:PropertyChangeEvent in event.items) { var feature:Feature = propertyChangeEvent.target as Feature; if (propertyChangeEvent.property === quot;geometryquot;) { var graphic:Graphic = m_graphicsDict[feature.featureId]; if (graphic) { graphic.geometry = feature.geometry; } } } }
  • 77. 1.private function mouseDownHandler(event:MouseEvent):void 2.{ 3. const graphic:Graphic = event.target as Graphic; 4. if (graphic) 5. { 6. m_feature = graphic.attributes as Feature; 7. m_graphic.geometry = map.toMapFromStage(event.stageX, event.stageY); 8. pointLayer.add(m_graphic); 9. map.addEventListener(MouseEvent.MOUSE_MOVE, mouseMoveHandler); 10. map.addEventListener(MouseEvent.MOUSE_UP, mouseUpHandler); 11. } 12.} 14.private function mouseMoveHandler(event:MouseEvent):void 15.{ 16. m_graphic.geometry = map.toMapFromStage(event.stageX, event.stageY); 17. event.updateAfterEvent(); 18.} 20.private function mouseUpHandler(event:MouseEvent):void 21.{ 22. m_feature.geometry = m_graphic.geometry; // ALL DS FM is Here :-) 23. m_feature = null; 24. pointLayer.clear(); 25. map.removeEventListener(MouseEvent.MOUSE_MOVE, mouseMoveHandler); 26. map.removeEventListener(MouseEvent.MOUSE_UP, mouseUpHandler); 27.}
  • 78. 1.private function mouseDownHandler(event:MouseEvent):void 2.{ 3. const graphic:Graphic = event.target as Graphic; 4. if (graphic) 5. { 6. m_feature = graphic.attributes as Feature; 7. m_graphic.geometry = map.toMapFromStage(event.stageX, event.stageY); 8. pointLayer.add(m_graphic); 9. map.addEventListener(MouseEvent.MOUSE_MOVE, mouseMoveHandler); 10. map.addEventListener(MouseEvent.MOUSE_UP, mouseUpHandler); 11. } 12.} 14.private function mouseMoveHandler(event:MouseEvent):void 15.{ 16. m_graphic.geometry = map.toMapFromStage(event.stageX, event.stageY); 17. event.updateAfterEvent(); 18.} 20.private function mouseUpHandler(event:MouseEvent):void 21.{ 22. m_feature.geometry = m_graphic.geometry; // ALL DS FM is Here :-) 23. m_feature = null; 24. pointLayer.clear(); 25. map.removeEventListener(MouseEvent.MOUSE_MOVE, mouseMoveHandler); 26. map.removeEventListener(MouseEvent.MOUSE_UP, mouseUpHandler); 27.}
  • 79. 1.private function mouseDownHandler(event:MouseEvent):void 2.{ 3. const graphic:Graphic = event.target as Graphic; 4. if (graphic) 5. { 6. m_feature = graphic.attributes as Feature; 7. m_graphic.geometry = map.toMapFromStage(event.stageX, event.stageY); 8. pointLayer.add(m_graphic); 9. map.addEventListener(MouseEvent.MOUSE_MOVE, mouseMoveHandler); 10. map.addEventListener(MouseEvent.MOUSE_UP, mouseUpHandler); 11. } 12.} 14.private function mouseMoveHandler(event:MouseEvent):void 15.{ 16. m_graphic.geometry = map.toMapFromStage(event.stageX, event.stageY); 17. event.updateAfterEvent(); 18.} 20.private function mouseUpHandler(event:MouseEvent):void 21.{ 22. m_feature.geometry = m_graphic.geometry; // ALL DS FM is Here :-) 23. m_feature = null; 24. pointLayer.clear(); 25. map.removeEventListener(MouseEvent.MOUSE_MOVE, mouseMoveHandler); 26. map.removeEventListener(MouseEvent.MOUSE_UP, mouseUpHandler); 27.}
  • 82.
  • 84. Spatial Index • RTree • QuadTree • Grid / Trellis • Simple • Efficient (points) • Good enough !
  • 85.
  • 86. 0,0 width,height
  • 87. Xmax,Ymax 0,0 width,height Xmin,Ymin
  • 88. Xmax,Ymax 0,0 width,height Xmin,Ymin
  • 89. Xmax,Ymax 0,0 width,height Xmin,Ymin
  • 90. Cy 3 2 1 0 Cx 0 1 2 3
  • 91. Cy (1,3) 3 (3,2) 2 (3,2) 1 (0,0) 0 Cx 0 1 2 3
  • 92. Cx & Cy > 0 int
  • 93. Cx & Cy < 216
  • 96. Cluster : Geometry • Original X • Original Y • Cluster X • Cluster Y • count
  • 98. ClusterSymbol : Symbol • Draws a Cluster geometry instance • Flash drawing API • beginFill - based on cluster count • drawRoundedRect - based on Cx,Cy
  • 100.
  • 102. Adaptive Clustering • JIT • “Smart” algorithm - all client side. • React to map extent change
  • 103.
  • 104. Given set of map points
  • 105. Given set of map points Assign map point to cluster set
  • 106. Given set of map points Assign map point to cluster set do
  • 107. Given set of map points Assign map point to cluster set do spatial index clusters
  • 108. Given set of map points Assign map point to cluster set do spatial index clusters for each cluster Ci
  • 109. Given set of map points Assign map point to cluster set do spatial index clusters for each cluster Ci find adjacent clusters Cj
  • 110. Given set of map points Assign map point to cluster set do spatial index clusters for each cluster Ci find adjacent clusters Cj if Cj is close enough to Ci
  • 111. Given set of map points Assign map point to cluster set do spatial index clusters for each cluster Ci find adjacent clusters Cj if Cj is close enough to Ci assign Cj map points to Ci
  • 112. Given set of map points Assign map point to cluster set do spatial index clusters for each cluster Ci find adjacent clusters Cj if Cj is close enough to Ci assign Cj map points to Ci remove Cj from cluster set
  • 113. Given set of map points Assign map point to cluster set do spatial index clusters for each cluster Ci find adjacent clusters Cj if Cj is close enough to Ci assign Cj map points to Ci remove Cj from cluster set adjust Ci location
  • 114. Given set of map points Assign map point to cluster set do spatial index clusters for each cluster Ci find adjacent clusters Cj if Cj is close enough to Ci assign Cj map points to Ci remove Cj from cluster set adjust Ci location repeat while overlapping clusters exist
  • 117. Adjusting Ci location Ci Cj Wj Wi
  • 118. Adjusting Ci location Ci Cj Wj Wi
  • 119. Adjusting Ci location Ci=(Ci Wi+CjWj)/WiWj Wi+Wj
  • 121.
  • 123. 1.<?xml version=quot;1.0quot; encoding=quot;utf-8quot;?> 2.<view:PrepApplication 3. xmlns:mx=quot;http://www.adobe.com/2006/mxmlquot; 4. xmlns:esri=quot;http://www.esri.com/2008/agsquot; 5. xmlns:controller=quot;com.esri.controller.*quot; 6. xmlns:view=quot;com.esri.view.*quot; 7. layout=quot;verticalquot; 8. paddingLeft=quot;0quot; 9. paddingRight=quot;0quot; 10. paddingTop=quot;0quot; 11. paddingBottom=quot;0quot; 12. > 13. <controller:LoadCommand/> 14. <view:PrepSlider/> 15. <view:PrepMap> 16. <view:extent> 17. <esri:Extent xmin=quot;-143.141073quot; ymin=quot;14.930875quot; xmax=quot;-48.0570833quot; ymax=quot;57.649769quot;/> 18. </view:extent> 19. <esri:ArcGISTiledMapServiceLayer 20. url=quot;http://server.arcgisonline.com/ArcGIS/rest/services/ESRI_Imagery_World_2D/MapServerquot;/> 21. <view:PrepLayer/> 22. </view:PrepMap> 23.</view:PrepApplication>
  • 124. 1.<?xml version=quot;1.0quot; encoding=quot;utf-8quot;?> 2.<view:PrepApplication 3. xmlns:mx=quot;http://www.adobe.com/2006/mxmlquot; 4. xmlns:esri=quot;http://www.esri.com/2008/agsquot; 5. xmlns:controller=quot;com.esri.controller.*quot; 6. xmlns:view=quot;com.esri.view.*quot; 7. layout=quot;verticalquot; 8. paddingLeft=quot;0quot; 9. paddingRight=quot;0quot; 10. paddingTop=quot;0quot; 11. paddingBottom=quot;0quot; 12. > 13. <controller:LoadCommand/> 14. <view:PrepSlider/> 15. <view:PrepMap> 16. <view:extent> 17. <esri:Extent xmin=quot;-143.141073quot; ymin=quot;14.930875quot; xmax=quot;-48.0570833quot; ymax=quot;57.649769quot;/> 18. </view:extent> 19. <esri:ArcGISTiledMapServiceLayer 20. url=quot;http://server.arcgisonline.com/ArcGIS/rest/services/ESRI_Imagery_World_2D/MapServerquot;/> 21. <view:PrepLayer/> 22. </view:PrepMap> 23.</view:PrepApplication>
  • 126. PrepLayer : Layer • Subclass Layer • Override updateLayer • Invoked by updateDisplayList • create bitmap - lock/unlock • bitmap.fillRect each heat map point • graphic.bitmapFill / drawRect
  • 128. PrepLayer • Kept data in 2 arrays • x = [] • y = [] • Easy to AMF • toScreenX/Y built-in functions
  • 130.
  • 132. Street Tracing • A* • Create nodes and edges • Define barriers • Reverse geocoding • Custom layer - faster rendering
  • 133. A* / Path Finding
  • 137. “Street” Graph • Intersection - nodes • Street Segment - edge • Travel distance or time - cost
  • 139. Nodes/Edges/Barriers C A E B D
  • 140. Nodes/Edges/Barriers C A E B D
  • 141. Nodes/Edges/Barriers C A E B D
  • 142. Street Info n St M ai
  • 143. Street Info 200 n St M ai 100
  • 144. Street Info 200 199 n St M ai 100 101
  • 146. ReverseGeocoding Main St Left 100-200 Right 101-199
  • 147. ReverseGeocoding Main St Left 100-200 Right 101-199 t
  • 148. ReverseGeocoding Main St Left 100-200 Right 101-199 t
  • 149. ReverseGeocoding Main St Left 100-200 Right 101-199 t d
  • 150. ReverseGeocoding Main St Left 100-200 Right 101-199 t d 153 Main St
  • 154. Distance Calculations AC • AB r= ∣AB∣2 C B r P A
  • 155. Distance Calculations AC • AB r≺0 beyond A ↤ r= ∣AB∣2 C B r P A
  • 156. Distance Calculations AC • AB r≺0 beyond A ↤ r= ∣AB∣2 r≻0 beyond B ↦ C B r P A
  • 157. Distance Calculations AC • AB r≺0 beyond A ↤ r= ∣AB∣2 r≻0 beyond B ↦ C 1 Ax Bx Cx A= 2 Ay By Cy B r P A
  • 158. Distance Calculations AC • AB r≺0 beyond A ↤ r= ∣AB∣2 r≻0 beyond B ↦ C 1 Ax Bx Cx A= 2 Ay By Cy height B r P A
  • 159. Distance Calculations AC • AB r≺0 beyond A ↤ r= ∣AB∣2 r≻0 beyond B ↦ C 1 Ax Bx Cx A= 2 Ay By Cy height B r P base A
  • 160. Distance Calculations AC • AB r≺0 beyond A ↤ r= ∣AB∣2 r≻0 beyond B ↦ C 1 Ax Bx Cx A= 2 Ay By Cy height B P base×height r A= base 2 A
  • 161. Distance Calculations AC • AB r≺0 beyond A ↤ r= ∣AB∣2 r≻0 beyond B ↦ C 1 Ax Bx Cx A= 2 Ay By Cy height B P base×height r A= base 2 A AP=rAB
  • 162. 1.override protected function updateLayer():void{ 2. const model:Model = Model.instance; 3. graphics.clear(); 4. graphics.lineStyle(1, 0); 5. model.streetGrid.search(map.extent, streetHandler); 6.} 8.private function streetHandler(street:Street, data:Object = null):void{ 9. for each(var path:Array in street.shpPolyline.paths){ 10. var index:int = 0; 11. var lastX:Number = toScreenX(path[index++]); 12. var lastY:Number = toScreenY(path[index++]); 13. graphics.moveTo(lastX, lastY); 14. while(index < path.length){ 15. var currX:Number = toScreenX(path[index++]); 16. var currY:Number = toScreenY(path[index++]); 17. if( currX !== lastX || currY !== lastY){ 18. graphics.lineTo(currX, currY); 19. lastX = currX; 20. lastY = currY; 21. } 22. } 23. } 24.}
  • 163. 1.override protected function updateLayer():void{ 2. const model:Model = Model.instance; 3. graphics.clear(); 4. graphics.lineStyle(1, 0); 5. model.streetGrid.search(map.extent, streetHandler); 6.} 8.private function streetHandler(street:Street, data:Object = null):void{ 9. for each(var path:Array in street.shpPolyline.paths){ 10. var index:int = 0; 11. var lastX:Number = toScreenX(path[index++]); 12. var lastY:Number = toScreenY(path[index++]); 13. graphics.moveTo(lastX, lastY); 14. while(index < path.length){ 15. var currX:Number = toScreenX(path[index++]); 16. var currY:Number = toScreenY(path[index++]); 17. if( currX !== lastX || currY !== lastY){ 18. graphics.lineTo(currX, currY); 19. lastX = currX; 20. lastY = currY; 21. } 22. } 23. } 24.}
  • 164. 1.override protected function updateLayer():void{ 2. const model:Model = Model.instance; 3. graphics.clear(); 4. graphics.lineStyle(1, 0); 5. model.streetGrid.search(map.extent, streetHandler); 6.} 8.private function streetHandler(street:Street, data:Object = null):void{ 9. for each(var path:Array in street.shpPolyline.paths){ 10. var index:int = 0; 11. var lastX:Number = toScreenX(path[index++]); 12. var lastY:Number = toScreenY(path[index++]); 13. graphics.moveTo(lastX, lastY); 14. while(index < path.length){ 15. var currX:Number = toScreenX(path[index++]); 16. var currY:Number = toScreenY(path[index++]); 17. if( currX !== lastX || currY !== lastY){ 18. graphics.lineTo(currX, currY); 19. lastX = currX; 20. lastY = currY; 21. } 22. } 23. } 24.}
  • 165. 1.override protected function updateLayer():void{ 2. const model:Model = Model.instance; 3. graphics.clear(); 4. graphics.lineStyle(1, 0); 5. model.streetGrid.search(map.extent, streetHandler); 6.} 8.private function streetHandler(street:Street, data:Object = null):void{ 9. for each(var path:Array in street.shpPolyline.paths){ 10. var index:int = 0; 11. var lastX:Number = toScreenX(path[index++]); 12. var lastY:Number = toScreenY(path[index++]); 13. graphics.moveTo(lastX, lastY); 14. while(index < path.length){ 15. var currX:Number = toScreenX(path[index++]); 16. var currY:Number = toScreenY(path[index++]); 17. if( currX !== lastX || currY !== lastY){ 18. graphics.lineTo(currX, currY); 19. lastX = currX; 20. lastY = currY; 21. } 22. } 23. } 24.}
  • 166. 1.override protected function updateLayer():void{ 2. const model:Model = Model.instance; 3. graphics.clear(); 4. graphics.lineStyle(1, 0); 5. model.streetGrid.search(map.extent, streetHandler); 6.} 8.private function streetHandler(street:Street, data:Object = null):void{ 9. for each(var path:Array in street.shpPolyline.paths){ 10. var index:int = 0; 11. var lastX:Number = toScreenX(path[index++]); 12. var lastY:Number = toScreenY(path[index++]); 13. graphics.moveTo(lastX, lastY); 14. while(index < path.length){ 15. var currX:Number = toScreenX(path[index++]); 16. var currY:Number = toScreenY(path[index++]); 17. if( currX !== lastX || currY !== lastY){ 18. graphics.lineTo(currX, currY); 19. lastX = currX; 20. lastY = currY; 21. } 22. } 23. } 24.}
  • 167. 1.override protected function updateLayer():void{ 2. const model:Model = Model.instance; 3. graphics.clear(); 4. graphics.lineStyle(1, 0); 5. model.streetGrid.search(map.extent, streetHandler); 6.} 8.private function streetHandler(street:Street, data:Object = null):void{ 9. for each(var path:Array in street.shpPolyline.paths){ 10. var index:int = 0; 11. var lastX:Number = toScreenX(path[index++]); 12. var lastY:Number = toScreenY(path[index++]); 13. graphics.moveTo(lastX, lastY); 14. while(index < path.length){ 15. var currX:Number = toScreenX(path[index++]); 16. var currY:Number = toScreenY(path[index++]); 17. if( currX !== lastX || currY !== lastY){ 18. graphics.lineTo(currX, currY); 19. lastX = currX; 20. lastY = currY; 21. } 22. } 23. } 24.}
  • 169. When Will I Use This ?