]> git.openstreetmap.org Git - nominatim-ui.git/blobdiff - src/pages/DetailsPage.svelte
Convert current_result and current_request_latlon stores into simple variables ...
[nominatim-ui.git] / src / pages / DetailsPage.svelte
index 5b8c1ce5e51d84c8cfa1eb265a023683464b3a72..5d6e6637105e0da451ee69ea7da57504973dea3b 100644 (file)
@@ -1,7 +1,6 @@
 <script>
   import { onMount } from 'svelte';
   import { fetch_from_api, update_html_title } from '../lib/api_utils.js';
-  import { current_result_store } from '../lib/stores.js';
 
   import {
     osmLink, detailsURL, wikipediaLink, coverageType, isAdminBoundary,
@@ -15,6 +14,7 @@
   let aPlace;
   let errorResponse;
   let base_url = window.location.search;
+  let current_result;
 
   function loaddata() {
     var search_params = new URLSearchParams(window.location.search);
       fetch_from_api('details', api_request_params, function (data) {
         if (data.error) {
           errorResponse = data;
-          current_result_store.set(undefined);
+          current_result = undefined;
         } else {
           aPlace = data;
           errorResponse = undefined;
-          current_result_store.set(data);
+          current_result = data;
         }
       });
     } else {
       </div>
       <div class="col-md-6">
         <div id="map-wrapper">
-          <Map/>
+          <Map {current_result} />
         </div>
       </div>
     </div>
     height:300px;
     border: 1px solid #666;
   }
-</style>
\ No newline at end of file
+</style>