File tree 1 file changed +14
-1
lines changed
grails-app/assets/javascripts
1 file changed +14
-1
lines changed Original file line number Diff line number Diff line change @@ -515,7 +515,20 @@ function enmapify(args) {
515
515
} ) [ 0 ] ;
516
516
//search from site collection in case it is a private site
517
517
if ( ! matchingSite ) {
518
- offlineGetSiteAndAddToSiteList ( siteId )
518
+ fetchSite ( siteId ) . done ( function ( result ) {
519
+ if ( result . data ) {
520
+ var site = result . data ;
521
+ site . name = 'Location of the sighting' ;
522
+ sitesObservable . push ( site ) ;
523
+ matchingSite = site ;
524
+ map . clearBoundLimits ( ) ;
525
+ map . setGeoJSON ( Biocollect . MapUtilities . featureToValidGeoJson ( matchingSite . extent . geometry ) ) ;
526
+ // Reassign since siteIdObservable value is cleared when the site is not listed in sitesObservable.
527
+ siteIdObservable ( siteId ) ;
528
+ }
529
+ } ) . fail ( function ( result ) {
530
+ console . log ( result . message ) ;
531
+ } ) ;
519
532
}
520
533
521
534
// TODO: OPTIMISE THE PROCEDUE
You can’t perform that action at this time.
0 commit comments