Hello,
I am trying to link geoJSON data with a custom form. The GeoJSON data is visible on a map and whn a polygon is clicked it goes to a new page which allows user to add/update data in it. But it must take the number mentioned on the polygon to the form in the next page. Here is the code:
The part of the code when the user clicks on the polygon and the router is placed:
layer.on('click', function(e) {
var string = feature.properties.name
Router.go('/Details/', string);
});
The router code:
Router.map(function(){
//Home Routethis.route(‘home’, {
path: ‘/’,
template: ‘home’
});this.route(‘PlotDetails’, {
path:’/Details’,
template: ‘PlotDetails’
});});
What should I add in “this.route” in order to send the string data mentioned in the above code snippet and paste it in:
<template name="PlotDetails">
<form action="" method="">
<div class="form-group">
<label for="">SNo/TP No</label> <input type="text" class="form-control" id="sntp" />
</div>
</form>
</template>
Kindly help.
Thank you in advance.