Hi,
I create a widget to find an adress with french ign service geocoder.
It help to write a correct adress or, from a click, it give the adress.
I need to use it to find what is near on different app with some specific information. I hope not cut and paste the simple widget and add specific stuff but i would like to add it in a place and get its result. I try to do it in dojo but it didn't work :
widget.js
define([
'dijit/_WidgetsInTemplateMixin', 'dijit/_AttachMixin','jimu/BaseWidget','../CD82_IGNRechercheAdresse/Widget'
'../'
], function (
_WidgetsInTemplateMixin, _AttachMixin, BaseWidget, CD82_IGNRechercheAdresse
) {
return declare([BaseWidget, _WidgetsInTemplateMixin, _AttachMixin], {
//Création
postCreate: function () {
//Récupère les paramètres du formulaire
this.inherited(arguments);
},
//Démarrage
startup: function () {
let w = new CD82_IGNRechercheAdresse();
w.placeAt(this.placeRecherche)
}
});
});
widget.html
<div>
<div data-dojo-attach-point="placeRecherche">
</div>
<div data-dojo-attach-point="SpecificZone">
</div>
</div>
How can I do this ?
Thanks
Solved! Go to Solution.
Hi,
Yes. I put all basics functions in jimu.js in a personnal folder. I must copy it every time I update wab :
Then I call it in the specifics widget like this :
For the specific content of the feature, I put a widget in a subfolder to display the information :
I specify it in config and I load it with require in widget :
You can see the app here : https://lacarto.ledepartement82.fr/FranceServices/
Search (right) is the first widget.
SidePanel is the second widget.
Red is in jimu.js/personnalfolder.
Blue is in the subfolder to display the information.
Yellow is also in another subfolder but works with attributes.
Great.
Guillaume.
Hey! Did you manage to complete the task?
Hi,
Yes. I put all basics functions in jimu.js in a personnal folder. I must copy it every time I update wab :
Then I call it in the specifics widget like this :
For the specific content of the feature, I put a widget in a subfolder to display the information :
I specify it in config and I load it with require in widget :
You can see the app here : https://lacarto.ledepartement82.fr/FranceServices/
Search (right) is the first widget.
SidePanel is the second widget.
Red is in jimu.js/personnalfolder.
Blue is in the subfolder to display the information.
Yellow is also in another subfolder but works with attributes.
Great.
Guillaume.
I look at the site, it turned out very cool !!! Can I borrow your code through devtools?
I just can't make a request to a third-party geocoder.
Yes if you want. I use this geocodeur in the widget : https://geoservices.ign.fr/