Skip to content

agrc/agrc.widgets

Repository files navigation

Build Status

AGRC Dojo Widgets

Projects that still use this library

Getting Started

  1. Clone the repo
  2. npm install && bower install && grunt

You can use our widgets just like any other Dojo widget. Just be sure to set your packages loader config property so that Dojo knows where to look.

Sample

require({
  packages: [{
    name: 'agrc',
    location: '../agrc.widgets'
  }]
}, [
  'esri/map',
  'esri/layers/ArcGISTiledMapServiceLayer',

  'agrc/widgets/locate/FindAddress'
], function (
Map,
Tiled,

FindAddress
) {
  var serviceUrl = 'http://mapserv.utah.gov/arcgis/rest/services/BaseMaps/Terrain/MapServer';
  var map = new Map('map-div');

  var tiledService = new Tiled(serviceUrl);

  map.addLayer(tiledService);

  var findAddress = new FindAddress({
    map: map,
    apiKey: 'get your key at http://developer.mapserv.utah.gov'
  }, 'find-address');
});

Browser Compatibility

We support the same browsers that ESRI's API does.