GithubHelp home page GithubHelp logo

Comments (13)

jcfranco avatar jcfranco commented on June 19, 2024

Could you provide a sample config to reproduce the issue?

from arcgis-viewer-flex.

carterbancroft avatar carterbancroft commented on June 19, 2024

Thanks for the fast response. In pulling it out to the simplest case, I learned that it will work with a feature layer alone, but a feature layer with the deprecated infoconfig for a popup will cause the error. So you'll need to add a basic old school info popup along with this config. I've included all the code necessary.

A simple config that will cause the error...

<?xml version="1.0" ?>
<configuration>
    <title>ArcGIS Viewer for Flex</title>
    <subtitle>a configurable web mapping application</subtitle>
    <logo>assets/images/logo.png</logo>
    <style>
        <colors>0xFFFFFF,0x333333,0x101010,0x000000,0xFFD700</colors>
        <alpha>0.8</alpha>
    </style>

    <geometryservice url="http://tasks.arcgisonline.com/ArcGIS/rest/services/Geometry/GeometryServer" />

    <widget left="10"  top="50"    config="widgets/Navigation/NavigationWidget.xml" url="widgets/Navigation/NavigationWidget.swf"/>
    <widget right="-2" bottom="-2" config="widgets/OverviewMap/OverviewMapWidget.xml" url="widgets/OverviewMap/OverviewMapWidget.swf"/>
    <widget right="20" top="55"    config="widgets/MapSwitcher/MapSwitcherWidget.xml" url="widgets/MapSwitcher/MapSwitcherWidget.swf"/>
    <widget left="0"   top="0"     config="widgets/HeaderController/HeaderControllerWidget.xml" url="widgets/HeaderController/HeaderControllerWidget.swf"/>

    <map wraparound180="true" initialextent="-14083000 3139000 -10879000 5458000" fullextent="-20000000 -20000000 20000000 20000000" top="40" addarcgisbasemaps="true">
        <operationallayers>
            <layer label="Demographics" type="dynamic" visible="true" alpha="1.0" url="http://server.arcgisonline.com/ArcGIS/rest/services/Demographics/USA_Median_Household_Income/MapServer">
                <sublayer id="1" popupconfig="popups/PopUp_Demographics_BlockGroups.xml"/>
            </layer>
            <layer label="Test" type="feature" visible="true" url="http://sampleserver1.arcgisonline.com/ArcGIS/rest/services/Demographics/ESRI_Census_USA/MapServer/5"
            infoconfig="widgets/test/test.xml"
            info="widgets/test/TestWidget.swf" /> 
        </operationallayers>
    </map>

    <widgetcontainer layout="float">

    </widgetcontainer>
</configuration>

Then create a new widget in src\widgets\test\ with a blank test.xml file. TestWidget.mxml's code is as follows...

<?xml version="1.0" encoding="utf-8"?>
<viewer:BaseWidget xmlns:fx="http://ns.adobe.com/mxml/2009" xmlns:s="library://ns.adobe.com/flex/spark" xmlns:viewer="com.esri.viewer.*" implements="com.esri.viewer.IInfowindowTemplate">
    <fx:Script>
        <![CDATA[
                public function set infoConfig(value:XML):void
        {
            configXML = value;
        }

        private var _infoClass:Class = TestWidget;
        public function set infoClass(value:Class):void
        {
            _infoClass = value;
        }

        public function get infoClass():Class
        {
            return _infoClass;
        }
    ]]>
</fx:Script>
</viewer:BaseWidget>

from arcgis-viewer-flex.

carterbancroft avatar carterbancroft commented on June 19, 2024

Just wanted to see if in fact someone over there was able to replicate my issue at least.

For what it's worth, I realize the infoconfig popup is deprecated. However, my understanding is that it should continue to work along with the new style popups, correct? The main reason I can't use the new ones in all cases is because as best as I can tell there is little to no ability to customize the popup for the new xml configured popups outside of what can be modified in the xml. I'd just use the old info win ones in all cases if I could too, but as far as I can tell the old style ones cannot be used on sublayers.

from arcgis-viewer-flex.

jcfranco avatar jcfranco commented on June 19, 2024

Sorry for the belated response.

I managed to reproduce the issue using your sample, so I'll look into this and will follow up soon as I can.

Thanks.

from arcgis-viewer-flex.

carterbancroft avatar carterbancroft commented on June 19, 2024

Most appreciated. I just wanted to make sure I'm not crazy. For now it seems like I'm able to work around it by rearranging my web config.

Edit: Scratch that... For my data, there doesn't appear to be a way to organize the config in such a way that all the required operational layers can be listed and not get the error. The config gets a bit fragile once you have feature layers with the old school infowin popups and sublayers.

from arcgis-viewer-flex.

dasa avatar dasa commented on June 19, 2024

You can customize the PopUpRendererSkin that comes from the API.

See:
http://forums.arcgis.com/threads/68055-Where-how-to-change-popup-window-details?highlight=popuprendererskin

from arcgis-viewer-flex.

carterbancroft avatar carterbancroft commented on June 19, 2024

Interesting, thanks Dasa. I'd have to look into it a little more to make sure it'd work, different popups would need to use different PopUpRendererSkins, it couldn't be the same skin project wide.

For example, I have one set of point features that need to have a popup with some extra buttons, one of which opens a new flex window with more detailed information. Then there is another set of point features that need to open a popup, but at the same time need to launch a new browser window to a link tied to the selected point feature.

from arcgis-viewer-flex.

dasa avatar dasa commented on June 19, 2024

You can extend PopUpRenderer to create a new class that you can then create a separate css type selector on.

from arcgis-viewer-flex.

carterbancroft avatar carterbancroft commented on June 19, 2024

Thanks, that makes sense. In any case I don't, at the moment, have time to switch our old code to a model like that.

from arcgis-viewer-flex.

jcfranco avatar jcfranco commented on June 19, 2024

I've pushed a fix that adds the layers in the proper order: https://github.com/rscheitlin/arcgis-viewer-flex/commit/0940779614f04509e02cacbec919e0437c7e51d8

from arcgis-viewer-flex.

carterbancroft avatar carterbancroft commented on June 19, 2024

Awesome, that fixes the issue. Thanks so much! I can close the issue or let someone on your end do it in case there is anything more that needs to be done.

from arcgis-viewer-flex.

rscheitlin avatar rscheitlin commented on June 19, 2024

JC, The link you provided to the fix no longer works can you provide an updated link? Robert

from arcgis-viewer-flex.

jcfranco avatar jcfranco commented on June 19, 2024

I've updated the link to point your repository since we dropped the branch after 3.1 was released.

from arcgis-viewer-flex.

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.