Giter Club home page Giter Club logo

Comments (12)

DavidSpriggs avatar DavidSpriggs commented on June 12, 2024

This is debatable. If you want a TOC control there are two third party solutions that you can integrate into the viewer with minimal effort here:
http://www.arcgis.com/home/item.html?id=98d9e760d6d1496487ca583b0e8ce73c
and
http://www.arcgis.com/home/item.html?id=9b6280a6bfb0430f8d1ebc969276b109

Read the "side note" section in the second link above on even having a TOC. I tend to agree. There are better ways to control what layers you view.

from cmv-app.

msokolDOIT avatar msokolDOIT commented on June 12, 2024

Thanks for the links!

I've used NLiu's TOC and I like it but it seems like it has problems working with secure services in IE.

I have also had problems with getting it to use Feature Layers. I'm still just learning JS so perhaps I'm not doing something right.

from cmv-app.

kgerhartz avatar kgerhartz commented on June 12, 2024

David, can you provide some general direction on how to rewrite NLiu's TOC to conform to your framework using AMD?

from cmv-app.

DavidSpriggs avatar DavidSpriggs commented on June 12, 2024

Basically you need to upgrade the module to AMD. AMD was introduced at dojo 1.7. There is a guide found here:
http://dojotoolkit.org/reference-guide/1.8/releasenotes/migration-17.html

It should work as is until dojo 2.0, is it not working? I can't provide much support here as its not a module I wrote.

from cmv-app.

kgerhartz avatar kgerhartz commented on June 12, 2024

Thanks. Understand about the support bit. It is not working but I am not sure about how to install within the CV (configurable Viewer) framework. Do you think you could provide some specific guidance on this so that I know how to approach in the future when adding legacy code?

From: David Spriggs [mailto:[email protected]]
Sent: Wednesday, May 15, 2013 1:34 PM
To: DavidSpriggs/ConfigurableViewerJSAPI
Cc: Keith KG. Gerhartz
Subject: Re: [ConfigurableViewerJSAPI] Legend Layers On/Off (#8)

Basically you need to upgrade the module to AMD. AMD was introduced at dojo 1.7. There is a guide found here:
http://dojotoolkit.org/reference-guide/1.8/releasenotes/migration-17.html

It should work as is until dojo 2.0, is it not working? I can't provide much support here as its not a module I wrote.


Reply to this email directly or view it on GitHubhttps://github.com//issues/8#issuecomment-17953684.

from cmv-app.

kcarrier avatar kcarrier commented on June 12, 2024

In my opinion while the side note logic makes sense, working in a government office we hear a lot of users asking for the ability to have more control especially the public when using an app like this. It really depends on the audience in my opinion. For example realtors have many different uses of a web map, some might want to see controls, others want to see addresses, some just want to see the outline of parcels, some hydrology. While giving the user the capability to potentially slow down the map one could also argue that not giving them options also limits the map. The ability to turn layers on and off seems important to me.

If the person authoring the map services takes into account the other map services currently being used in the application then I would think things could be built in such a fashion that they do not overlap. For example the one I was just given is,"well I do not always need to see the parcel number as a label sometimes I just want to see the address". Well if I combined all that info as a label there would certainly be overlap. So I had to create another map service so the user could toggle off the parcel number and turn on addresses. This is also because some but not all users need/want to see parcel dimensions which is another layer that uses annotation.

I agree the subject is debatable but in my opinion not giving the user the option to turn things on and off also limits the application. If there is a cleaner way of handling a situation like I described above I would be very interested in learning. thanks again for all your work David!

from cmv-app.

brodsr avatar brodsr commented on June 12, 2024

Hi David
Would a check box for turning on and off layers be appropriate? Yes, please.

from cmv-app.

DavidSpriggs avatar DavidSpriggs commented on June 12, 2024

Yes I need to do this. Look for it soon...

from cmv-app.

gismasterjedi avatar gismasterjedi commented on June 12, 2024

David, thanks for the great work on this project! Any progress on turn layer on/off feature? Thanks!

from cmv-app.

 avatar commented on June 12, 2024

Sorry for my english and for my meddling , first this application is great for a start because give you the ways to build your own widgets or use others ,probably David dont want to give a tool not enough tested but you could give a turn around using this http://gmaps-utility-gis.googlecode.com/svn/tags/agsjs/latest/docs/toc/examples.html or http://www.arcgis.com/home/item.html?id=9b6280a6bfb0430f8d1ebc969276b109
first you could follow the toc (Table of Contents) example, to add in david's application you only need to put the css and the package location ,later In the config.js section you put this in widgets

TOC: {
          include: true,
          title: "Layers",
      open: false,
          position: 5
    },

and in the Controller.js section of widgets

 if (config.widgets.TOC && config.widgets.TOC.include) {
                var TOCTP = this._createTitlePane(config.widgets.TOC.title, config.widgets.TOC.position, config.widgets.TOC.open);
                require(['agsjs/dijit/TOC'], lang.hitch(this, function (TOC) {
                    this.toc = new TOC({
                        map: this.map,
                        layerInfos: this.legendLayerInfos
                    }, domConstruct.create("div")).placeAt(TOCTP.containerNode);
                }));
            }

You could configure the toc layers where the legendLayerInfos is pushing the layers or getting the properties from the operationlayer declaration here a bad example that works(because all layers will have slider and no legend):

this.legendLayerInfos.push({
                    layer: l,
                    title: layer.title || null,
                    slider: true, 
                    noLegend : true
                });

with this you could have the toc tool and if u configure it in TOC.js File you could show it like you want ,a simple example:
image
I hope this works for someone and sorry david for meddling.

from cmv-app.

DavidSpriggs avatar DavidSpriggs commented on June 12, 2024

No worries. I have been meaning to put this in for awhile. I will do so soon, with some mods to the toc.

from cmv-app.

DavidSpriggs avatar DavidSpriggs commented on June 12, 2024

Done. Widget is included now.

from cmv-app.

Related Issues (20)

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.