Searches by area names in OpenLayers with request of ajax in the PostGIS database
Does an advisor owe his/her student anything? Will an advisor keep a PhD student only out of pity?
Make a Bowl of Alphabet Soup
Can you use Vicious Mockery to win an argument or gain favours?
Why should universal income be universal?
Why do ¬, ∀ and ∃ have the same precedence?
What is Cash Advance APR?
It grows, but water kills it
Which Article Helped Get Rid of Technobabble in RPGs?
Shouldn’t conservatives embrace universal basic income?
Are Captain Marvel's powers affected by Thanos breaking the Tesseract and claiming the stone?
I found an audio circuit and I built it just fine, but I find it a bit too quiet. How do I amplify the output so that it is a bit louder?
What is the highest possible scrabble score for placing a single tile
Multiplicative persistence
How do you make your own symbol when Detexify fails?
Can a stoichiometric mixture of oxygen and methane exist as a liquid at standard pressure and some (low) temperature?
15% tax on $7.5k earnings. Is that right?
Why is it that I can sometimes guess the next note?
What does "Scientists rise up against statistical significance" mean? (Comment in Nature)
Why do Radio Buttons not fill the entire outer circle?
How many arrows is an archer expected to fire by the end of the Tyranny of Dragons pair of adventures?
What is going on with gets(stdin) on the site coderbyte?
Is there a RAID 0 Equivalent for RAM?
What does Apple's new App Store requirement mean
What fields between the rationals and the reals allow a good notion of 2D distance?
Searches by area names in OpenLayers with request of ajax in the PostGIS database
We built a GeoJSON:
{"type":"FeatureCollection","features":[{"type":"Feature","id":0,"geometry":{"type":"Polygon","coordinates":[[[669023.843,415221.025],[669031.588,415222.415],[669059.365,415154.448],[669064.041,415143.41],[669049.477,415135.059],[668987.876,415095.463],[668934.69,415061.12],[668904.2,415041.659],[668903.285,415044.048],[668934.224,415064.815],[668987.091,415097.897],[669048.669,415137.58],[669057.03,415142.935],[669054.159,415149.762],[669049.569,415160.172],[669045.995,415169.095],[669034.656,415197.283],[669031.864,415205.9],[669023.843,415221.025]]]},"crs":{"type":"EPSG","properties":{"code":"31700"}},"geometry_name":"wkb_geometry","properties":{"ogc_fid":0,"id_teren":"2","id_cons":"0","cons":"0","layer":"Green Area","wkb_geometry":"010300000001000000130000002DB29DAFBF6A24419A999919D457194103560E2DCF6A24418FC2F5A8D9571941AE47E1BA066B24411283C0CAC9561941B6F3FD14106B24413D0AD7A39D561941105839F4F26A2441FA7E6A3C7C5619416F1283C0776A244108AC1CDADD55194114AE47610D6A2441AE47E17A5455194166666666D069244160E5D0A2065519412085EB91CE69244177E9263110551941C520B0720C6A2441295C8F4263551941508D972E766A2441002B8796E7551941022B8756F16A24411F85EB5186561941F6285C0F026B2441D5A370BD9B561941B1726851FC6A24415CBA490CB7561941CFF75323F36A24419CC420B0E0561941D8A370FDEB6A244114AE476104571941643BDF4FD56A244183C0CA21755719413F355EBACF6A24419A999999975719412DB29DAFBF6A24419A999919D4571941"}},{"type":"Feature","id":0,"geometry":{"type":"Polygon","coordinates":[[[669023.843,415221.025],[669031.588,415222.415],[669059.365,415154.448],[669064.041,415143.41],[669049.477,415135.059],[668987.876,415095.463],[668934.69,415061.12],[668904.2,415041.659],[668903.285,415044.048],[668934.224,415064.815],[668987.091,415097.897],[669048.669,415137.58],[669057.03,415142.935],[669054.159,415149.762],[669049.569,415160.172],[669045.995,415169.095],[669034.656,415197.283],[669031.864,415205.9],[669023.843,415221.025]]]},"crs":{"type":"EPSG","properties":{"code":"31700"}},"geometry_name":"wkb_geometry","properties":{"ogc_fid":0,"id_teren":"2","id_cons":"0","cons":"0","layer":"Green Area","wkb_geometry":"010300000001000000130000002DB29DAFBF6A24419A999919D457194103560E2DCF6A24418FC2F5A8D9571941AE47E1BA066B24411283C0CAC9561941B6F3FD14106B24413D0AD7A39D561941105839F4F26A2441FA7E6A3C7C5619416F1283C0776A244108AC1CDADD55194114AE47610D6A2441AE47E17A5455194166666666D069244160E5D0A2065519412085EB91CE69244177E9263110551941C520B0720C6A2441295C8F4263551941508D972E766A2441002B8796E7551941022B8756F16A24411F85EB5186561941F6285C0F026B2441D5A370BD9B561941B1726851FC6A24415CBA490CB7561941CFF75323F36A24419CC420B0E0561941D8A370FDEB6A244114AE476104571941643BDF4FD56A244183C0CA21755719413F355EBACF6A24419A999999975719412DB29DAFBF6A24419A999919D4571941"}}]}
which puts it on a map of OpenLayers, and here, based on a request in the database according to some search criteria, I return to a table the results I have found. In this table is a button that if you press it and highlights on the map an area whose name I searched for.
I do not know how I might be looking at the geometry that links to that id in GeoJSON so I can color and highlight it as a search result :(
so far I have done so far:
function wiev_search_results(id_teren){
alert(id_teren);
console.log(map);
}
The function that runs when the button is pressed is: wiev_search_results (id_teren) and as an attribute has id_teren which is the ID that is found in GeoJSON already displayed on the map, you should find this id and color the geometry in another color and zoom on it ....
Thank you in advance for your answers!
openlayers geojson ajax
add a comment |
We built a GeoJSON:
{"type":"FeatureCollection","features":[{"type":"Feature","id":0,"geometry":{"type":"Polygon","coordinates":[[[669023.843,415221.025],[669031.588,415222.415],[669059.365,415154.448],[669064.041,415143.41],[669049.477,415135.059],[668987.876,415095.463],[668934.69,415061.12],[668904.2,415041.659],[668903.285,415044.048],[668934.224,415064.815],[668987.091,415097.897],[669048.669,415137.58],[669057.03,415142.935],[669054.159,415149.762],[669049.569,415160.172],[669045.995,415169.095],[669034.656,415197.283],[669031.864,415205.9],[669023.843,415221.025]]]},"crs":{"type":"EPSG","properties":{"code":"31700"}},"geometry_name":"wkb_geometry","properties":{"ogc_fid":0,"id_teren":"2","id_cons":"0","cons":"0","layer":"Green Area","wkb_geometry":"010300000001000000130000002DB29DAFBF6A24419A999919D457194103560E2DCF6A24418FC2F5A8D9571941AE47E1BA066B24411283C0CAC9561941B6F3FD14106B24413D0AD7A39D561941105839F4F26A2441FA7E6A3C7C5619416F1283C0776A244108AC1CDADD55194114AE47610D6A2441AE47E17A5455194166666666D069244160E5D0A2065519412085EB91CE69244177E9263110551941C520B0720C6A2441295C8F4263551941508D972E766A2441002B8796E7551941022B8756F16A24411F85EB5186561941F6285C0F026B2441D5A370BD9B561941B1726851FC6A24415CBA490CB7561941CFF75323F36A24419CC420B0E0561941D8A370FDEB6A244114AE476104571941643BDF4FD56A244183C0CA21755719413F355EBACF6A24419A999999975719412DB29DAFBF6A24419A999919D4571941"}},{"type":"Feature","id":0,"geometry":{"type":"Polygon","coordinates":[[[669023.843,415221.025],[669031.588,415222.415],[669059.365,415154.448],[669064.041,415143.41],[669049.477,415135.059],[668987.876,415095.463],[668934.69,415061.12],[668904.2,415041.659],[668903.285,415044.048],[668934.224,415064.815],[668987.091,415097.897],[669048.669,415137.58],[669057.03,415142.935],[669054.159,415149.762],[669049.569,415160.172],[669045.995,415169.095],[669034.656,415197.283],[669031.864,415205.9],[669023.843,415221.025]]]},"crs":{"type":"EPSG","properties":{"code":"31700"}},"geometry_name":"wkb_geometry","properties":{"ogc_fid":0,"id_teren":"2","id_cons":"0","cons":"0","layer":"Green Area","wkb_geometry":"010300000001000000130000002DB29DAFBF6A24419A999919D457194103560E2DCF6A24418FC2F5A8D9571941AE47E1BA066B24411283C0CAC9561941B6F3FD14106B24413D0AD7A39D561941105839F4F26A2441FA7E6A3C7C5619416F1283C0776A244108AC1CDADD55194114AE47610D6A2441AE47E17A5455194166666666D069244160E5D0A2065519412085EB91CE69244177E9263110551941C520B0720C6A2441295C8F4263551941508D972E766A2441002B8796E7551941022B8756F16A24411F85EB5186561941F6285C0F026B2441D5A370BD9B561941B1726851FC6A24415CBA490CB7561941CFF75323F36A24419CC420B0E0561941D8A370FDEB6A244114AE476104571941643BDF4FD56A244183C0CA21755719413F355EBACF6A24419A999999975719412DB29DAFBF6A24419A999919D4571941"}}]}
which puts it on a map of OpenLayers, and here, based on a request in the database according to some search criteria, I return to a table the results I have found. In this table is a button that if you press it and highlights on the map an area whose name I searched for.
I do not know how I might be looking at the geometry that links to that id in GeoJSON so I can color and highlight it as a search result :(
so far I have done so far:
function wiev_search_results(id_teren){
alert(id_teren);
console.log(map);
}
The function that runs when the button is pressed is: wiev_search_results (id_teren) and as an attribute has id_teren which is the ID that is found in GeoJSON already displayed on the map, you should find this id and color the geometry in another color and zoom on it ....
Thank you in advance for your answers!
openlayers geojson ajax
add a comment |
We built a GeoJSON:
{"type":"FeatureCollection","features":[{"type":"Feature","id":0,"geometry":{"type":"Polygon","coordinates":[[[669023.843,415221.025],[669031.588,415222.415],[669059.365,415154.448],[669064.041,415143.41],[669049.477,415135.059],[668987.876,415095.463],[668934.69,415061.12],[668904.2,415041.659],[668903.285,415044.048],[668934.224,415064.815],[668987.091,415097.897],[669048.669,415137.58],[669057.03,415142.935],[669054.159,415149.762],[669049.569,415160.172],[669045.995,415169.095],[669034.656,415197.283],[669031.864,415205.9],[669023.843,415221.025]]]},"crs":{"type":"EPSG","properties":{"code":"31700"}},"geometry_name":"wkb_geometry","properties":{"ogc_fid":0,"id_teren":"2","id_cons":"0","cons":"0","layer":"Green Area","wkb_geometry":"010300000001000000130000002DB29DAFBF6A24419A999919D457194103560E2DCF6A24418FC2F5A8D9571941AE47E1BA066B24411283C0CAC9561941B6F3FD14106B24413D0AD7A39D561941105839F4F26A2441FA7E6A3C7C5619416F1283C0776A244108AC1CDADD55194114AE47610D6A2441AE47E17A5455194166666666D069244160E5D0A2065519412085EB91CE69244177E9263110551941C520B0720C6A2441295C8F4263551941508D972E766A2441002B8796E7551941022B8756F16A24411F85EB5186561941F6285C0F026B2441D5A370BD9B561941B1726851FC6A24415CBA490CB7561941CFF75323F36A24419CC420B0E0561941D8A370FDEB6A244114AE476104571941643BDF4FD56A244183C0CA21755719413F355EBACF6A24419A999999975719412DB29DAFBF6A24419A999919D4571941"}},{"type":"Feature","id":0,"geometry":{"type":"Polygon","coordinates":[[[669023.843,415221.025],[669031.588,415222.415],[669059.365,415154.448],[669064.041,415143.41],[669049.477,415135.059],[668987.876,415095.463],[668934.69,415061.12],[668904.2,415041.659],[668903.285,415044.048],[668934.224,415064.815],[668987.091,415097.897],[669048.669,415137.58],[669057.03,415142.935],[669054.159,415149.762],[669049.569,415160.172],[669045.995,415169.095],[669034.656,415197.283],[669031.864,415205.9],[669023.843,415221.025]]]},"crs":{"type":"EPSG","properties":{"code":"31700"}},"geometry_name":"wkb_geometry","properties":{"ogc_fid":0,"id_teren":"2","id_cons":"0","cons":"0","layer":"Green Area","wkb_geometry":"010300000001000000130000002DB29DAFBF6A24419A999919D457194103560E2DCF6A24418FC2F5A8D9571941AE47E1BA066B24411283C0CAC9561941B6F3FD14106B24413D0AD7A39D561941105839F4F26A2441FA7E6A3C7C5619416F1283C0776A244108AC1CDADD55194114AE47610D6A2441AE47E17A5455194166666666D069244160E5D0A2065519412085EB91CE69244177E9263110551941C520B0720C6A2441295C8F4263551941508D972E766A2441002B8796E7551941022B8756F16A24411F85EB5186561941F6285C0F026B2441D5A370BD9B561941B1726851FC6A24415CBA490CB7561941CFF75323F36A24419CC420B0E0561941D8A370FDEB6A244114AE476104571941643BDF4FD56A244183C0CA21755719413F355EBACF6A24419A999999975719412DB29DAFBF6A24419A999919D4571941"}}]}
which puts it on a map of OpenLayers, and here, based on a request in the database according to some search criteria, I return to a table the results I have found. In this table is a button that if you press it and highlights on the map an area whose name I searched for.
I do not know how I might be looking at the geometry that links to that id in GeoJSON so I can color and highlight it as a search result :(
so far I have done so far:
function wiev_search_results(id_teren){
alert(id_teren);
console.log(map);
}
The function that runs when the button is pressed is: wiev_search_results (id_teren) and as an attribute has id_teren which is the ID that is found in GeoJSON already displayed on the map, you should find this id and color the geometry in another color and zoom on it ....
Thank you in advance for your answers!
openlayers geojson ajax
We built a GeoJSON:
{"type":"FeatureCollection","features":[{"type":"Feature","id":0,"geometry":{"type":"Polygon","coordinates":[[[669023.843,415221.025],[669031.588,415222.415],[669059.365,415154.448],[669064.041,415143.41],[669049.477,415135.059],[668987.876,415095.463],[668934.69,415061.12],[668904.2,415041.659],[668903.285,415044.048],[668934.224,415064.815],[668987.091,415097.897],[669048.669,415137.58],[669057.03,415142.935],[669054.159,415149.762],[669049.569,415160.172],[669045.995,415169.095],[669034.656,415197.283],[669031.864,415205.9],[669023.843,415221.025]]]},"crs":{"type":"EPSG","properties":{"code":"31700"}},"geometry_name":"wkb_geometry","properties":{"ogc_fid":0,"id_teren":"2","id_cons":"0","cons":"0","layer":"Green Area","wkb_geometry":"010300000001000000130000002DB29DAFBF6A24419A999919D457194103560E2DCF6A24418FC2F5A8D9571941AE47E1BA066B24411283C0CAC9561941B6F3FD14106B24413D0AD7A39D561941105839F4F26A2441FA7E6A3C7C5619416F1283C0776A244108AC1CDADD55194114AE47610D6A2441AE47E17A5455194166666666D069244160E5D0A2065519412085EB91CE69244177E9263110551941C520B0720C6A2441295C8F4263551941508D972E766A2441002B8796E7551941022B8756F16A24411F85EB5186561941F6285C0F026B2441D5A370BD9B561941B1726851FC6A24415CBA490CB7561941CFF75323F36A24419CC420B0E0561941D8A370FDEB6A244114AE476104571941643BDF4FD56A244183C0CA21755719413F355EBACF6A24419A999999975719412DB29DAFBF6A24419A999919D4571941"}},{"type":"Feature","id":0,"geometry":{"type":"Polygon","coordinates":[[[669023.843,415221.025],[669031.588,415222.415],[669059.365,415154.448],[669064.041,415143.41],[669049.477,415135.059],[668987.876,415095.463],[668934.69,415061.12],[668904.2,415041.659],[668903.285,415044.048],[668934.224,415064.815],[668987.091,415097.897],[669048.669,415137.58],[669057.03,415142.935],[669054.159,415149.762],[669049.569,415160.172],[669045.995,415169.095],[669034.656,415197.283],[669031.864,415205.9],[669023.843,415221.025]]]},"crs":{"type":"EPSG","properties":{"code":"31700"}},"geometry_name":"wkb_geometry","properties":{"ogc_fid":0,"id_teren":"2","id_cons":"0","cons":"0","layer":"Green Area","wkb_geometry":"010300000001000000130000002DB29DAFBF6A24419A999919D457194103560E2DCF6A24418FC2F5A8D9571941AE47E1BA066B24411283C0CAC9561941B6F3FD14106B24413D0AD7A39D561941105839F4F26A2441FA7E6A3C7C5619416F1283C0776A244108AC1CDADD55194114AE47610D6A2441AE47E17A5455194166666666D069244160E5D0A2065519412085EB91CE69244177E9263110551941C520B0720C6A2441295C8F4263551941508D972E766A2441002B8796E7551941022B8756F16A24411F85EB5186561941F6285C0F026B2441D5A370BD9B561941B1726851FC6A24415CBA490CB7561941CFF75323F36A24419CC420B0E0561941D8A370FDEB6A244114AE476104571941643BDF4FD56A244183C0CA21755719413F355EBACF6A24419A999999975719412DB29DAFBF6A24419A999919D4571941"}}]}
which puts it on a map of OpenLayers, and here, based on a request in the database according to some search criteria, I return to a table the results I have found. In this table is a button that if you press it and highlights on the map an area whose name I searched for.
I do not know how I might be looking at the geometry that links to that id in GeoJSON so I can color and highlight it as a search result :(
so far I have done so far:
function wiev_search_results(id_teren){
alert(id_teren);
console.log(map);
}
The function that runs when the button is pressed is: wiev_search_results (id_teren) and as an attribute has id_teren which is the ID that is found in GeoJSON already displayed on the map, you should find this id and color the geometry in another color and zoom on it ....
Thank you in advance for your answers!
openlayers geojson ajax
openlayers geojson ajax
asked 1 min ago
CoderCoder42CoderCoder42
304
304
add a comment |
add a comment |
0
active
oldest
votes
Your Answer
StackExchange.ready(function() {
var channelOptions = {
tags: "".split(" "),
id: "79"
};
initTagRenderer("".split(" "), "".split(" "), channelOptions);
StackExchange.using("externalEditor", function() {
// Have to fire editor after snippets, if snippets enabled
if (StackExchange.settings.snippets.snippetsEnabled) {
StackExchange.using("snippets", function() {
createEditor();
});
}
else {
createEditor();
}
});
function createEditor() {
StackExchange.prepareEditor({
heartbeatType: 'answer',
autoActivateHeartbeat: false,
convertImagesToLinks: false,
noModals: true,
showLowRepImageUploadWarning: true,
reputationToPostImages: null,
bindNavPrevention: true,
postfix: "",
imageUploader: {
brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
allowUrls: true
},
onDemand: true,
discardSelector: ".discard-answer"
,immediatelyShowMarkdownHelp:true
});
}
});
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fgis.stackexchange.com%2fquestions%2f316338%2fsearches-by-area-names-in-openlayers-with-request-of-ajax-in-the-postgis-databas%23new-answer', 'question_page');
}
);
Post as a guest
Required, but never shown
0
active
oldest
votes
0
active
oldest
votes
active
oldest
votes
active
oldest
votes
Thanks for contributing an answer to Geographic Information Systems Stack Exchange!
- Please be sure to answer the question. Provide details and share your research!
But avoid …
- Asking for help, clarification, or responding to other answers.
- Making statements based on opinion; back them up with references or personal experience.
To learn more, see our tips on writing great answers.
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fgis.stackexchange.com%2fquestions%2f316338%2fsearches-by-area-names-in-openlayers-with-request-of-ajax-in-the-postgis-databas%23new-answer', 'question_page');
}
);
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown