GithubHelp home page GithubHelp logo

agrc.widgets's Introduction

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.

agrc.widgets's People

Contributors

dependabot[bot] avatar rsarijlou avatar stdavis avatar steveoh avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

agrc.widgets's Issues

BaseMap router spatial reference

the basemap router always creates a point with the 26912 spatial reference. The point is created before the map is loaded so you can't get the spatial reference from the layers. You could get the spatialReference from the extent which gets set in the constructor if you moved the router init call below the default extent initialization.

HTTPS URL's

Need to dynamically adjust all urls to use https if the current app does. Could use same code as google analytics does:

src = 'https:' == document.location.protocol ? 'https://ssl' : 'http://www'

Documentation

I would like to give our widgets some documentation. I think they deserve it. I think the dojo doc parser is horrible and would like to try something pretty, like docco.

I like the way it mixes code with the documentation side by side and it would be a good fit.

It could make a good gh-pages branch then as well.

Update basemap urls

Update basemap URL's from mapserv.utah.gov to basemaps.utah.gov.

Affects:

  • BaseMap
  • BaseMapSelector

Basemap selector

The basemap selector doesn't appear to function properly if you have two tiled layers and a dynamic layer on top.

FindAddress:geocodeAddress

This method needs some work.

  • Should return a promise (why does it return false always?)
  • Should provide a better hook into validation. Right now there's just a private _validate method.
  • Overall this module doesn't pass the new linting profile that we have.

Numeric Text Input Validator Module

Create a module that queries for all <input type='number'> elements and sets up validation behavior using standard DOM properties and bootstrap markup conventions.

After the app has initialized markup, the module should use dojo/query to get a NodeList of all related elements.

Then it should set up callbacks for the onchange and onkeyup events. These should use a regular expression that is tuned with the element's min and max DOM properties to validate the value. This should include checking for whole numbers or decimal places. For example for min='0' max='10' "1.5" would be invalid. To allow for "1.5", min='0.0' max='10.0' would be used.

If the value is valid it should set a custom DOM property, isValid, to true and any invalid markup should be hidden/reset.

If the value is not valid it should display an error message and change the color of the input using bootstrap conventions. The custom DOM property, isValid, should also be set to false.

The custom DOM property, isValid, could then be used as validation when the form is submitted.

Initial use case of this module will be the Wildlife app.

@steveoh: What do you think?

Fix travis build

does the travis grunt task work locally? It looks very similar to the stubmodule issue I was having? Is the version correct?

  • add the badge for travis build status

probably want to do this in a separate branch to be able to experiment and rebase the commits to stay clean.

Find by place name

This is not returning complete results. We probably need a replacement in the new search api.

screen shot 2013-06-17 at 10 35 11 am

Grunt esri slurp

Throw it in there. Try it as a grunt task with tr latest version from npm.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.