GithubHelp home page GithubHelp logo

esri / arcgis-viewer-flex Goto Github PK

View Code? Open in Web Editor NEW
135.0 54.0 150.0 8.89 MB

Source code for ArcGIS Viewer for Flex - a great application framework for web applications.

Home Page: http://links.esri.com/flexviewer

License: Apache License 2.0

Shell 0.08% JavaScript 4.50% ActionScript 95.06% CSS 0.35%

arcgis-viewer-flex's Introduction

arcgis-viewer-flex

This is the source code for the ArcGIS Viewer for Flex (a.k.a Flex Viewer). Learn more about Flex Viewer at ArcGIS Viewer for Flex resource center.

View live app here

Image of Flex Viewer app

Features

  • Ready-to-deploy GIS web client mapping app for ArcGIS Server.
  • A complete web mapping application, and application framework that allows for ease and efficiency toward building web-mapping applications based on ArcGIS API for Flex.
  • Many basemaps to choose from: Streets, Satellite, Topography, Oceans, Grayscale...
  • Widgets provide specific functionality, but their source code can also be used as samples for other apps
  • Easily configurable to meet custom business needs and requirements - no programming skills required to deploy.
  • Viewer functionality is defined by widgets - many core widgets are included.
  • New functionality can be created with custom widgets developed using ArcGIS API for Flex.

Instructions (Getting Started)

There are three different ways of getting the source code from the GitHub web site: clone, [fork] (https://help.github.com/articles/fork-a-repo) and download zip. See http://links.esri.com/flexviewer-gettingstarted-developers for more details.

Once you have the source code on your own machine, you need to import it into Adobe Flash Builder.

  1. In Adobe Flash Builder 4.6 or 4.7, go to "File" -> "Import Flash Builder project...", then depending on whether you have a zip file or not, follow step 2 or 3.
  2. If you downloaded the zip file:
  3. Keep "File" option selected, click "Browse..." button. Select the downloaded flexviewer-3.[]-src.zip file, for example "C:\Documents and Settings\jack\My Documents\flexviewer-3.[]-src.zip".
  4. "Extract new project to:" textbox will be automatically set to location where the project source will reside, e.g. "C:\Documents and Settings\jack\Adobe Flash Builder 4.7\FlexViewer.
  5. If you cloned and/or forked the repo:
  6. Select "Project folder", click "Browse..." button and navigate to your local repo, for example C:\Users\jack\Documents\GitHub\arcgis-viewer-flex.
  7. Click "Finish" button. Project will be created and displayed in the Package Explorer window of Adobe Flash Builder, e.g. in this case FlexViewer.
  8. If prompted to upgrade the project (because it was created with a previous version of Flash Builder), click "OK"
  9. If prompted to choose Flex SDK version, select "Flex 4.6.0" or higher.
  10. Download API Library from http://links.esri.com/flex-api/latest-download. Unzip it.
  11. Go to "Project" -> "Properties" -> "Flex Build Path".
  12. Click "Add SWC" and navigate to the agslib-3.[*]-[YYYY-MM-DD].swc API library file.

Optionally:

  1. Right click on this project (FlexViewer) -> Click "Properties" -> Click "Flex Build Path".
  2. In the "Output folder" textbox at bottom, specify the location of your web server where your Flex Viewer should be deployed, e.g. in case of IIS web server, C:\Inetpub\wwwroot\flexviewerdebug.
  3. In "Output folder URL" text box, specify the URL that matches with your output folder specified in last step, e.g. http://localhost/flexviewerdebug/
  4. Click OK
  5. Rebuild the project.
  6. Select the project. Now let's run it - there are multiple ways of doing this: one way is to click green triangle button on top, another way is click Ctrl-F11 and a third way is to click "Run" menu, then select "Run Index".
  7. Browser will open and Flex Viewer application will be displayed.

Requirements

  • Knowledge of Flex development.
  • A little background with Adobe/Apache Flex SDK.
  • Experience with the ArcGIS API for Flex would help.

Resources

Issues

Find a bug or want to request a new feature? Please let us know by submitting an issue.

Contributing

Anyone and everyone is welcome to contribute.

Licensing

Copyright 2012-2013 Esri

Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at

http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.

A copy of the license is available in the repository's license.txt file.

[](Esri Tags: ArcGIS Web Flex Viewer Map Library API) [](Esri Language: ActionScript)

arcgis-viewer-flex's People

Contributors

alaframboise avatar bsvensson avatar dasa avatar jcfranco avatar lheberlie avatar rscheitlin avatar ycabon avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

arcgis-viewer-flex's Issues

MapManager bug related to sublayers and feature layers

If there is a layer in the main config.xml with sub layers and a feature layer referenced below it in the config an error will be thrown with the following stack trace...

TypeError: Error #1010: A term is undefined and has no properties.
at com.esri.viewer.managers::MapManager/infoReady()[C:\Source\Git\Conoco\FlexViewer\src\com\esri\viewer\managers\MapManager.mxml:1125]
at com.esri.viewer.managers::WidgetManager/widgetConfigLoadedHandler()[C:\Source\Git\Conoco\FlexViewer\src\com\esri\viewer\managers\WidgetManager.mxml:709]
at flash.events::EventDispatcher/dispatchEventFunction()
at flash.events::EventDispatcher/dispatchEvent()
at mx.core::UIComponent/dispatchEvent()
at com.esri.viewer::BaseWidget/configResultHandler()[C:\Source\Git\Conoco\FlexViewer\src\com\esri\viewer\BaseWidget.as:567]
at flash.events::EventDispatcher/dispatchEventFunction()
at flash.events::EventDispatcher/dispatchEvent()
at HTTPOperation/http://www.adobe.com/2006/flex/mx/internal::dispatchRpcEvent()
at mx.rpc::AbstractInvoker/http://www.adobe.com/2006/flex/mx/internal::resultHandler()
at mx.rpc::Responder/result()
at mx.rpc::AsyncRequest/acknowledge()
at DirectHTTPMessageResponder/completeHandler()
at flash.events::EventDispatcher/dispatchEventFunction()
at flash.events::EventDispatcher/dispatchEvent()
at flash.net::URLLoader/onComplete()

The error occurs here... https://github.com/ArcGIS/ArcGISViewerForFlex/blob/master/src/com/esri/viewer/managers/MapManager.mxml#L1123

The problem is that m_operationalLayerIndex exceeds the bounds of the m_operationalLayers array in this instance, and that happens because for each sublayer the m_operationalLayerIndex value is incremented without adding a new layer to the m_operationalLayers array.

In older versions of the viewer m_operationalLayerIndex would not get incremented for sublayers, so this problem would never occur. It seems like the issue came about with the addition of this massive and complicated parseArray function.

I've been debugging this issue for two full work days now... The code is very difficult to follow and I haven't been able to come up with a hack to get it to work correctly, let alone an actual solution that I could submit a pull request for.

I found one reference to someone else having what I believe is the same issue...

http://forums.arcgis.com/threads/67135-Attachment-Relate-Info-Window-Widget-version-3.0.2i-for-FlexViewer-3.0

Some hacks to get it to work are suggested, but as the original poster finally stated at the bottom they are not sufficient in all cases, and certainly not sufficient in my case.

From my perspective, this is a critical bug. I'm still gathering information and if I can fix it, I will submit a pull request, but it's been very difficult to get enough understanding to even know what the correct fix would be. At this point, I really just need to come up with a hack to make it work. Please look into this and if you know what the issue is, I would LOVE a fix for it.

Upload+geoprocessor

I,m working on a model that it has upload capability, but flex's geoprocessor has not browse capability. In flex's geoprocessor, client should add an address that start with "http". I think uploading a file to a http address isn't reachable for clients.

Handle output GP params supported by result map service

Currently, the GP widget will process all output parameters via GPResultImageLayers if there is a result map service available. Only output parameters that are supported by result map services (GPFeatureRecordsetLayer and GPRasterDataLayer) should be processed this way.

RTE caused by clicking on search results.

RTE caused by additional change event being dispatched when clicking on a search result.

Steps to reproduce:

  1. Launch Flex Viewer.
  2. Type 'Redlands' in search box then hit Enter.
  3. Click on any result.

Add more locales

Add Danish, Hebrew, Lithuanian, and Portuguese-Portuguese locales to the included Viewer locales. These locales are also planned to be added to the API as part of the next release (3.2).

Overviewmap widget.

don't work with simply wms or wmts layer.
my specific case: I've a wms layer served by mapproxy and wmts layer served by geoserver (gwc).
the overviewmap is blank.
if i add a layer osm, the overviewmap work properly, but the base layer (wms and wmts) aren't show anymore (white screen).
maybe it's a correlation from this 2 scenario.
example config.xml to try the issue:

 <layer label="osm" type="osm" />
<layer label="GeoMapproxy2-wmts" type="wmts" visible="true" imageformat="png" 
                url="http://127.0.0.1:8080/geoserver/gwc/service/wmts"  
                servicemode="KVP"  layerid="cite:mapnik_osm_demo"/> 

the overview widget is set to default: use the selected basemap for the overview map.

Search/Query widget does not display value correctly if value is 0

Steps to reproduce:

  1. Create/Use a service that includes data with zero values in a numerical field.
  2. Create a Flex application, enable the Query widget, and access the data from your service.
  3. Preview the application and use the Query widget to note that zero values are not displayed.

Sample QueryWidget config:

<?xml version="1.0" ?>
<configuration>
    <layer>http://sampleserver1.arcgisonline.com/ArcGIS/rest/services/Demographics/ESRI_Census_USA/MapServer/0</layer>
    <query/>
    <titlefield>POP2000</titlefield>
    <linkfield>HOUSEHOLDS</linkfield>
    <refreshrate/>
    <zoomscale/>
    <shareresults>false</shareresults>
    <orderbyfields>POP2000</orderbyfields>
    <fields all="false">
        <field name="POP2000" alias="POP2000"/>
    </fields>
</configuration>

Sample SearchWidget config:

<?xml version="1.0" ?>
<configuration>
    <zoomscale>50000</zoomscale>
    <shareresults>false</shareresults>
    <layers>
        <layer>
            <name>Name</name>
            <url>http://sampleserver1.arcgisonline.com/ArcGIS/rest/services/Demographics/ESRI_Census_USA/MapServer/0</url>
            <expression>ObjectID = [value]</expression>
            <textsearchlabel>Label</textsearchlabel>
            <titlefield>HOUSEHOLDS</titlefield>
            <fields>
                <field name="HOUSEHOLDS" alias="HOUSEHOLDS"/>
            </fields>
            <orderbyfields>HOUSEHOLDS</orderbyfields>
        </layer>
    </layers>
</configuration>

Enable returnZ in flex viewer 3.0

How can I enable returnZ in flex viewer 3.0?
I have a model that generate a 3d line by this steps: user draw a line, then model calculate 3d line from a DEM file.

Everything is ok in my model and I can run geoprocessing service by .Net web application, but when I run my geoprocessing service by flex viewer 3, it return this error:esriJob failed

I checked service log file and found this error message:
geometry can not have z value
How can I enable returnZ in flex viewer 3.0?

Please help me.
Regards

Indeterminate state of checkbox in TOC component

Seems how the Indeterminate state of the checkbox is never used in the TOC component, should that code not be removed or better yet replaced with a scale dependent state like that of ArcMap. Attached it the overlay that I use in my TOC Widget to represent scale dependency.

sd_overlay

And the some code for my class that extends CheckBoxIcon:

if (scaleDep) {
var cTransform:ColorTransform = new ColorTransform();
cTransform.alphaMultiplier = 0.3
var rect:Rectangle = new Rectangle(0, 0, 14, 14);
var myBitmap:BitmapData = new sdIcon().bitmapData;
myBitmap.colorTransform(rect, cTransform);
graphics.beginBitmapFill(myBitmap, null, false, false);
graphics.drawRect(0,0,w,h);
graphics.endFill();
}

[SingleLineSearch] Result graphic issue

Using the SingleLineSearch, the result graphic sometimes shows up and sometimes it don't. When using keyboard arrows and pressing enter for one search result in the result list the graphic appear, and if I'm typing a searchterm that only gets one result the graphic appear as well. But when clicking with the mouse on a result in the result list, the info window shows and the map zoom in to the result but no graphic appear.

I did some debugging and it seems like when using the mouse and clicking one search result, at first the code runs as expected but then the resultList_changeHandler function is triggered again causing the showSearchResultOnMap function to run again with no searchResult object. So the result graphic is removed and no new graphic is added since the searchResult is null this second time the function is triggered.

There's a thread in the forum about this here:
http://forums.arcgis.com/threads/74045-configuring-searchbox-in-HeaderControllerWidget-3.1
But since there was some other questions there I started a new thread about this here:
http://forums.arcgis.com/threads/75682-Searchbox-result-graphic-bug

/Mattias

Google earth base map support

Bing map and Esri base maps are poor and have not good resolution. Is it possible to add google map as base map to flex viewer? I know google don't publish WMS services and just allow user to use google map by google api. But esri should try to access google's license.

Use GP param label for shared result image layer name

The parameter name is being used for the result image layer's name, which is not desirable.

The following line:

resultImageLayer.name = shareResults ? paramName : "hiddenLayer_" + paramName;

should be:

resultImageLayer.name = shareResults ? outputParam.label : "hiddenLayer_" + paramName;

popups in 3.1 causes problem on application startup

This problem is discussed in these two threads in the forum:
http://forums.arcgis.com/threads/73800-Issues-upgrading-Flexviewer-3.1-(uncompiled)
http://forums.arcgis.com/threads/76137-Header-widget-display-issue-when-upgrading-to-3.1

For some of us users there is an TypeError: Error #1009
at com.esri.viewer.components.toc.tocClasses::TocMapLayerItem/createChildren()
When loading the 3.1 viewer with a cleared browser cache with sublayer popups in dynamic layers. The error stops the application from loading the widgets properly. When refreshing the page it works until browser cache is cleared.
I haven't been able to reproduce this using only public Esri map services, but using the 3.1 viewer (compiled or uncompiled version) and only change the map services in the config.xml to my own services I get this problem. The same services and popups worked fine in 3.0.
More details can be found in the threads in the forum.
I don't know if you prefer users to report issues in the forums or here on github or both?
/Mattias

Allow bypassing GP result map server

The GP widget will use the RMS by default, therefore ignoring the renderer configuration. Adding an option to avoid usage of a GP server's result map server will help honor the renderer configuration when displaying results.

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.