Skip to content
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

Merged
merged 13 commits into from
May 23, 2017
Merged

Conversation

pjjmunier
Copy link
Contributor

Creation des méthodes permettant l'ajout du nouveau controle GetFeatureInfo de l'extension ol3

@gcebelieu gcebelieu self-requested a review February 16, 2017 12:37
@gcebelieu
Copy link
Member

Il faudrait mettre à niveau cette PR suite aux dernières modifs sur la PR (mergée) de l'extension :

IGNF/geoportal-extensions#100

Copy link
Member

@gcebelieu gcebelieu left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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>
Copy link
Member

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 @@

Copy link
Member

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. |
Copy link
Member

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> |
Copy link
Member

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 ?

@gcebelieu gcebelieu merged commit 7032ea6 into master May 23, 2017
@gcebelieu gcebelieu deleted the feature-control-getfeatureinfo branch May 23, 2017 06:54
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants