-
Notifications
You must be signed in to change notification settings - Fork 14
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Feature control getfeatureinfo #4
Conversation
…'ajout des couches KML n'étant plus asynchrone)
Il faudrait mettre à niveau cette PR suite aux dernières modifs sur la PR (mergée) de l'extension : |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
- Quelques ajustements à faire dans la doc
- Je pense que la dernière version du js de l'extension n'a pas été mise à jour depuis le merge final de la PR getFeatureInfo fonctionnel geoportal-extensions#104
Cela devrait permettre de faire marcher les exemples (et donc la fonctionnalité du GFI sur le SDK)
@@ -16,27 +16,52 @@ | |||
<script src="../../dist/ol3/GpOl3-src.js"></script> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Cet exemple ne fonctionne pas : j'ai l'erreur suivante dans la console :
16:54:15,598 TypeError: Gp.ProxyUtils is undefined 1 GpOl3-src.js:52902:13
IMap</IMap.prototype.setProxy http://localhost/gilles/apiv3/geoportal-sdk/dist/ol3/GpOl3-src.js:52902:13
ol3OL3</OL3.prototype._addVectorLayer http://localhost/gilles/apiv3/geoportal-sdk/dist/ol3/GpOl3-src.js:54672:26
IMap</IMap.prototype.addLayers http://localhost/gilles/apiv3/geoportal-sdk/dist/ol3/GpOl3-src.js:53143:21
IMap</IMap.prototype._afterGetConfig http://localhost/gilles/apiv3/geoportal-sdk/dist/ol3/GpOl3-src.js:52755:13
IMap</IMap.prototype._afterInitMap/<.onSuccess http://localhost/gilles/apiv3/geoportal-sdk/dist/ol3/GpOl3-src.js:52723:25
onAnalyzeResponse http://localhost/gilles/apiv3/geoportal-sdk/dist/ol3/GpOl3-src.js:25708:29
ServicesAutoConfResponseAutoConfResponseFactory</AutoConfReponseFactory.build http://localhost/gilles/apiv3/geoportal-sdk/dist/ol3/GpOl3-src.js:28098:21
ServicesAutoConfAutoConf</AutoConf.prototype.analyzeResponse http://localhost/gilles/apiv3/geoportal-sdk/dist/ol3/GpOl3-src.js:28203:21
onCallService http://localhost/gilles/apiv3/geoportal-sdk/dist/ol3/GpOl3-src.js:25704:25
ServicesCommonService</CommonService.prototype.callService/options.onResponse http://localhost/gilles/apiv3/geoportal-sdk/dist/ol3/GpOl3-src.js:25782:29
ProtocolsJSONP</JSONP.call/window[options.callbackName] http://localhost/gilles/apiv3/geoportal-sdk/dist/ol3/GpOl3-src.js:25444:29
<anonyme> http://wxs.ign.fr/jhyvi0fgmnuxvfv0zjzorvdn/autoconf:1:1
@@ -24,16 +24,31 @@ | |||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Cet exemple ne fonctionne pas. J'ai l'erreur suivante dans la console :
16:56:00,718 TypeError: ol.control.GetFeatureInfo is not a constructor 1 GpOl3-src.js:54340:23
ol3OL3</OL3.prototype.addGetFeatureInfoControl http://localhost/gilles/apiv3/geoportal-sdk/dist/ol3/GpOl3-src.js:54340:23
IMap</IMap.prototype.addControls http://localhost/gilles/apiv3/geoportal-sdk/dist/ol3/GpOl3-src.js:53317:34
IMap</IMap.prototype._afterGetConfig http://localhost/gilles/apiv3/geoportal-sdk/dist/ol3/GpOl3-src.js:52760:13
IMap</IMap.prototype._afterInitMap/<.onSuccess http://localhost/gilles/apiv3/geoportal-sdk/dist/ol3/GpOl3-src.js:52723:25
onAnalyzeResponse http://localhost/gilles/apiv3/geoportal-sdk/dist/ol3/GpOl3-src.js:25708:29
ServicesAutoConfResponseAutoConfResponseFactory</AutoConfReponseFactory.build http://localhost/gilles/apiv3/geoportal-sdk/dist/ol3/GpOl3-src.js:28098:21
ServicesAutoConfAutoConf</AutoConf.prototype.analyzeResponse http://localhost/gilles/apiv3/geoportal-sdk/dist/ol3/GpOl3-src.js:28203:21
onCallService http://localhost/gilles/apiv3/geoportal-sdk/dist/ol3/GpOl3-src.js:25704:25
ServicesCommonService</CommonService.prototype.callService/options.onResponse http://localhost/gilles/apiv3/geoportal-sdk/dist/ol3/GpOl3-src.js:25782:29
ProtocolsJSONP</JSONP.call/window[options.callbackName] http://localhost/gilles/apiv3/geoportal-sdk/dist/ol3/GpOl3-src.js:25444:29
<anonyme> http://wxs.ign.fr/jhyvi0fgmnuxvfv0zjzorvdn/autoconf:1:1
* | options.active | Boolean | optional | true | Specifies if the control is active or inactive. When inactive no request is fired and no information displayed. | | ||
* | options.defaultEvent | String | optional | 'singleclick' | Specifies the default triggering event chosen in the list ['singleclick', 'dblclick', 'contextmenu']. This is the triggering event of all layers added to the control without configured triggering event. | | ||
* | options.defaultInfoFormat | String | optional | 'text/html' | Indicates the default format mime-type of the response of GetFeatureInfo requests. | | ||
* | options.cursorStyle | String | optional | 'pointer' | Specifies the type of cursor to be displayed when pointing on vector feature of a layer previously added to the control. The value must be choosen in the possible values of the css cursor property. | |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Il manque la doc de l'option "hidden"
src/Map.js
Outdated
* | options.defaultEvent | String | optional | 'singleclick' | Specifies the default triggering event chosen in the list ['singleclick', 'dblclick', 'contextmenu']. This is the triggering event of all layers added to the control without configured triggering event. | | ||
* | options.defaultInfoFormat | String | optional | 'text/html' | Indicates the default format mime-type of the response of GetFeatureInfo requests. | | ||
* | options.cursorStyle | String | optional | 'pointer' | Specifies the type of cursor to be displayed when pointing on vector feature of a layer previously added to the control. The value must be choosen in the possible values of the css cursor property. | | ||
* | layers | Object | | | List of layers requested by the control and their options (those layers have to be queryable). Associative array mapping ids of layers and their properties : </br><ul><li>event (String, optional) : name of the mouse event triggering the "getfeatureinfo" request.</li></ul> | |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ne devrait-on pas avoir la propriété "infoFormat" en plus de event ?
Creation des méthodes permettant l'ajout du nouveau controle GetFeatureInfo de l'extension ol3