帖子
|
是的,当然。非常感谢。/** @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
|
1
|
23
|
帖子
|
@Jean-FrançoisDucré-Robitaille @JeffPace你好!我也有类似的问题。我无法在ArcGIS Portal或Experience Builder(包括开发者版)中编辑数据。这是我们从Oracle数据库中得到的数据。你有什么解决这个问题的办法吗?非常感谢你的建议!
...查看更多
11小时前
|
0
|
1
|
31
|
帖子
|
@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
|
3.
|
34
|
帖子
|
这就跟你问声好!我需要帮助。如何在体验生成器(开发人员版)中创建悬浮弹出框?我读了很多文章,但我不知道在wich文件和在wich地方,我可以为这个选项编码。谢谢你的帮助和建议!
...查看更多
|
0
|
0
|
10
|
帖子
|
这就跟你问声好!我需要帮忙。我也在做同样的事情。我想有悬停弹出我的地图在经验建设者(开发者版)。但是我不能那样做。你解决这个问题了吗?谢谢你的帮助和建议!
...查看更多
|
0
|
0
|
15
|
帖子
|
这就跟你问声好!你能给我一些建议吗?我在Experience Builder (Developer Edition)中的项目中遇到了同样的问题。在我看来,你的解决方案可以解决这个问题。但是我找不到这个参数(“编辑器可以看到哪些特征?”)。我能在传送门的资料中找到这个吗?这些参数在什么地方?非常感谢你的建议!
...查看更多
周四
|
0
|
0
|
21
|
帖子
|
这就跟你问声好!我需要帮助,拜托了。我可以创建悬停弹出在经验生成器(开发者版)?我知道代码什么可以做悬停弹出。我看了很多文章,但还是不知道该在哪个地方和哪个文件中添加。也许它可以在map初始化的地方完成。但我找不到它在代码中的位置。谢谢你的帮助!
...查看更多
|
0
|
5
|
113
|
帖子
|
这就跟你问声好!我需要帮助,拜托了。我可以创建悬停弹出在经验生成器(开发者版)?我知道代码什么可以做悬停弹出。但是我不知道需要添加什么位置和文件。我看了很多文章,但还是不知道答案。也许它可以在map初始化的地方完成。但我找不到它在代码中的位置。谢谢你的帮助!
...查看更多
|
0
|
0
|
23
|