帖子
|
嗨!我尝试在自定义小部件中创建悬浮弹出(相关帖子://www.gobook3.com/t5/arcgis-javascript-maps-sdk-questions/hover-popup-experience-builder-dev/m-p/1248642)。在我看来,一种可能的实现方式是layerId跟踪。例如,hitTest()在地图上寻找layerId,如果有图形元素弹出是打开的。当鼠标移出图层时,弹出窗口是关闭的。如果没有任何图层弹出是不调用的。我在代码中使用这些组件,但我不能以正确的方式做任何事情。不管用。我找不到layerId选项,并将其添加到同等方法。非常感谢你的建议! /** @jsx jsx */ import { React, AllWidgetProps, jsx, IMDataSourceInfo, DataSource, DataSourceManager, DataSourceStatus, FeatureLayerQueryParams, DataSourceComponent } from 'jimu-core' import { JimuMapViewComponent, JimuMapView, FeatureLayerDataSource } from "jimu-arcgis"; import { result } from 'lodash-es'; import View from 'esri/views/View'; import {DataSourceSelector, AllDataSourceTypes, FieldSelector} from 'jimu-ui/advanced/data-source-selector'; import { viewChangeBufferCompare } from 'dist/widgets/arcgis/bookmark/src/setting/utils'; export const myFeatureLayer={} as const export default class Widget extends React.PureComponent
{this.props.hasOwnProperty("useMapWidgetIds") && this.props.useMapWidgetIds && this.props.useMapWidgetIds[0] && ( ); } }
...查看更多
|
0
|
1
|
67
|
帖子
|
嗨!我需要帮助。有我的帖子关于悬停弹出在经验建设者。但我需要一些额外的建议。(//www.gobook3.com/t5/arcgis-javascript-maps-sdk-questions/experience-builder-developer-edition/m-p/1248466#M79913)。这里有悬浮弹出的代码(见附件)。但我想解决这些问题:1。自定义特性层。现在悬停弹出工作的所有图形在地图上。我想为一些图层(点或多边形或线)创建悬浮弹出。 I try to create method what choose data source from my Map widget. I try to declare feature layer, but can't. I only realized opportunity to choose map, layer and even filed in setting.tsx. But hover pop up work only for Map widget. 2. Now hover pop up work with timer. So every time (when timer is end) pop up is updated and twinkles. We think about checking if feature layer still equantly the same. But the problem is the same: I haven't feature layer's variable. 3. Now hover pop up isn't close when mouse move out from layer/object. The 2 and 3 issue isn't important. I have image how to solve it, but I'll be very glad for any advice for it. The real problem for me is the first issue. There is my widget.tsx: /** @jsx jsx */ import { React, AllWidgetProps, jsx, IMDataSourceInfo, DataSource, DataSourceManager, DataSourceStatus, FeatureLayerQueryParams, DataSourceComponent } from 'jimu-core' import { JimuMapViewComponent, JimuMapView, FeatureLayerDataSource } from "jimu-arcgis"; import { result } from 'lodash-es'; import View from 'esri/views/View'; import {DataSourceSelector, AllDataSourceTypes, FieldSelector} from 'jimu-ui/advanced/data-source-selector'; import { viewChangeBufferCompare } from 'dist/widgets/arcgis/bookmark/src/setting/utils'; export const myFeatureLayer={} as const export default class Widget extends React.PureComponent
{this.props.hasOwnProperty("useMapWidgetIds") && this.props.useMapWidgetIds && this.props.useMapWidgetIds[0] && ( ); } }
...查看更多
|
0
|
1
|
45
|
帖子
|
@JamesGough,嗨!你能给点建议吗?你说得对。我想参考特定的功能层。所以我改变了设置。tsx,并获得机会从我的地图小部件选择特征层(我想创建弹出什么可能能够为特定层,因为现在悬停弹出活跃的所有图形层)。但是悬停弹出窗口不能使用它。你能详细介绍DataSourceSelector吗?例如,如何获得悬浮弹出的功能层?有小部件。TSX和设置。tsx files in attachment (.zip with hoverPopup widget). Also this is my setting.tsx change: import { React, Immutable, IMFieldSchema, UseDataSource } from 'jimu-core' import { AllWidgetSettingProps } from 'jimu-for-builder' import { MapWidgetSelector } from 'jimu-ui/advanced/setting-components' import {DataSourceSelector, AllDataSourceTypes, FieldSelector} from 'jimu-ui/advanced/data-source-selector'; import { render } from '@testing-library/react'; import { WebMapDataSourceImpl } from 'jimu-arcgis/arcgis-data-source'; export default function Setting(props: AllWidgetSettingProps<{}>){ const onMapWidgetSelected = (useMapWidgetIds: string[]) => { props.onSettingChange({ id: props.id, useMapWidgetIds: useMapWidgetIds }); } const onFieldChange = (allSelectedFields: IMFieldSchema[]) => { props.onSettingChange({ id: props.id, useDataSources: [{...props.useDataSources[0], ...{fields: allSelectedFields.map(f => f.jimuName)}}] }); } const onToggleUseDataEnabled = (useDataSourcesEnabled: boolean) => { props.onSettingChange({ id: props.id, useDataSourcesEnabled }); } const onDataSourceChange = (useDataSources: UseDataSource[]) => { props.onSettingChange({ id: props.id, useDataSources: useDataSources, }); } return (
|
0
|
0
|
40
|
帖子
|
@ChelseaRozek,非常感谢!我们找到了问题的原因。我们从Oracle数据库接收了这个层,而Oracle数据库没有SDE。使用请求层解决了这个问题。祝你顺利完成任务!
...查看更多
一周前
|
0
|
0
|
8
|
帖子
|
@JeffPace1你好!非常感谢你的建议!但不幸的是,这并不能解决我们的问题。我们有一个问题,输出/显示数据从Oracle数据库在门户(体验建设者,仪表板)。我们没有这个数据库的权限。我们只是用户。我们还了解了Oracle建立的数据库以及与ArcGIS的正确连接。但是没有SDE。例如,我们工作的项目包括几个层。一些层来自另一个数据库,它的工作是正确的。 And one layer is from Oracle database. Maybe, he doesn't accesseble. We try to create Chart with data this layer, but in result get error: "failt to load" (see atachment). In Dashboards from Portal error is: "cannot access data". Have you any idea for that? UPD. We solved it using query layer for getting data from Oracle database. Thanks a lot!
...查看更多
|
0
|
0
|
13
|
帖子
|
哇!这是工作。非常感谢!
...查看更多
|
0
|
0
|
65
|
帖子
|
是的,当然。非常感谢。/** @jsx jsx */ import {React, AllWidgetProps, jsx} from 'jimu-core' import {JimuMapViewComponent, JimuMapView} from "jimu-arcgis";import Point from“esri/geometry/Point”;import Popup from 'esri/widgets/Popup';从esri/PopupTemplate导入PopupTemplate导出默认类Widget扩展React。PureComponent < AllWidgetProps < any >, any >{state = {jimuMapView: null,纬度:"",经度:"",timer: null, PopupTemplate: {title: "{state_abbr}", content: "{state_name}"}};setLatLong = (lat: number, long: number) =>{此。setState({纬度:纬度。 toFixed ( 3 ), longitude : long . toFixed ( 3 ), PopupTemplate : { title : "{state_abbr}" , content : "{state_name}" } }); } activeViewChangeHandler = ( jmv : JimuMapView ) => { if ( jmv ) { this . setState ({ jimuMapView : jmv }); jmv . view . on ( "pointer-move" , ( evt ) => { if ( this . state . timer ){ clearTimeout ( this . state . timer ) } jmv . view . hitTest ( event ). then ( function ( response ) { if ( response . results . length ) { var graphic = response . results . filter ( function ( result ) { // check if the graphic belongs to the layer of interest return result . graphic . layer === featureLayer ; })[ 0 ]. graphic ; jmv . view . popup . open ({ location : graphic . geometry . centroid , features : [ graphic ] }); } else { jmv . view . popup . close (); } }); this . setState ({ timer : setTimeout ( this . setLatLong , 0 , point . latitude , point . longitude ) }) }); } }; render () { return ( < div className = "widget-hoverPopup jimu-widget" > { this . props . hasOwnProperty ( "useMapWidgetIds" ) && this . props . useMapWidgetIds && this . props . useMapWidgetIds [ 0 ] && ( < JimuMapViewComponent useMapWidgetId = {this . props . useMapWidgetIds ?.[ 0 ] } onActiveViewChange = {this . activeViewChangeHandler } /> ) } < p > Latitude/Longtitude/hoverPopup: { this . state . latitude } { this . state . longitude } p > div > ); } }
...查看更多
|
0
|
3.
|
97
|
帖子
|
@Jean-FrançoisDucré-Robitaille @JeffPace你好!我也有类似的问题。我无法在ArcGIS Portal或Experience Builder(包括开发者版)中编辑数据。这是我们从Oracle数据库中得到的数据。你有什么解决这个问题的办法吗?非常感谢你的建议!
...查看更多
|
0
|
2
|
53
|
帖子
|
@JamesGough,非常感谢!我将这段代码用于popup: view。在("pointer-move", function (event) { view.hitTest(event).then(function (response) { if (response.results.length) { var graphic = response.results.filter(function (result) { // check if the graphic belongs to the layer of interest return result.graphic.layer === featureLayer; })[0].graphic; view.popup.open({ location: graphic.geometry.centroid, features: [graphic] }); } else { view.popup.close(); } }); }); I tried adaptate him to your example, but can't do it in the right way (get issue with "featureLayer" or "[graphic]").
...查看更多
|
0
|
5
|
108
|
帖子
|
嗨!我需要帮助。如何在体验生成器(开发人员版)中创建悬浮弹出框?我读了很多文章,但我不知道在wich文件和在wich地方,我可以为这个选项编码。谢谢你的帮助和建议!
...查看更多
2周前
|
0
|
0
|
44
|