nova-map-marker-field icon indicating copy to clipboard operation
nova-map-marker-field copied to clipboard

Marker is not moving after i've search on the textbox

Open recepgums opened this issue 5 years ago • 8 comments

MapMarker::make("Location")
                ->latitude('latitude')
                ->longitude('longitude')->searchProvider('openstreetmap'),

** image ** It was working yesterday as well but now doesn't work

recepgums avatar Jan 10 '20 13:01 recepgums

Hi @recepgums, could you be more specific as to what "is not working"? We haven't made any updates, as you can so, so it is likely either an issue with OpenStreetMaps, or a configuration change in your app.

If you can provide any stack trace or other error logs, that would help identify what is going on.

mikebronner avatar Jan 10 '20 15:01 mikebronner

Hi @recepgums, could you be more specific as to what "is not working"? We haven't made any updates, as you can so, so it is likely either an issue with OpenStreetMaps, or a configuration change in your app.

If you can provide any stack trace or other error logs, that would help identify what is going on.

nova-map-marker-field:1 Uncaught (in promise) Error: Bounds are not valid.
    at e.fitBounds (nova-map-marker-field:1)
    at NewClass.centerMap (nova-map-marker-field:1)
    at NewClass.showResult (nova-map-marker-field:1)
    at NewClass.<anonymous> (nova-map-marker-field:1)
    at eval (eval at <anonymous> (nova-map-marker-field:1), <anonymous>:1:2976)

I got this error on console.

I mean after i filled textbox and pressed enter, i couldn't see any moving on map. Marker is stayin same possition. There may be an error with OpenStreetMaps as you say

recepgums avatar Jan 13 '20 01:01 recepgums

I have the same issue. I did not declare the search provider explicitly. I get search results but when I select an entry from the suggestions, nothing happens.

I can confirm that it was working some time ago but now it isn't.

parelius avatar May 04 '20 07:05 parelius

@parelius Thanks for adding to the conversation. :) Could you provide your Nova field declaration as well? That will help with troubleshooting.

mikebronner avatar May 04 '20 13:05 mikebronner

Hi Mike, sure I can:

use GeneaLabs\NovaMapMarkerField\MapMarker;
use Eminiarts\Tabs\Tabs;

public function fields(Request $request)
{
	return [
	
		// some more fields...
	
		(new Tabs('Info', [
		
			__('photos.tab-content') => [
			
				// some more fields...
			
				MapMarker::make(__('photos.coordinates'))
				                    ->latitude('exif_latitude')
				                    ->longitude('exif_longitude')
				                    ->defaultLatitude(46.951082)
				                    ->defaultLongitude(7.438632)
				                    ->required()
				                    ->hideFromIndex(),
			
			],
			
			// some more tabs...
		
		])),
	
	];
}

As you see, I'm using Eminiarts\Tabs\Tabs. I don't see a difference if using MapMarker inside Tabs or not. The issue remains the same. MapMarker used to work, even within Tabs, some time ago.

I'm currently on Laravel framework 7.9.2 and Nova 3.5.0, but I noticed this issue earlier with Laravel 7.6.2 and Nova 3.3.2.

Console Log is the same as reported by @recepgums

nova-map-marker-field:1 Uncaught (in promise) Error: Bounds are not valid.
    at e.fitBounds (nova-map-marker-field:1)
    at e.centerMap (nova-map-marker-field:1)
    at e.showResult (nova-map-marker-field:1)
    at e.<anonymous> (nova-map-marker-field:1)
    at eval (eval at <anonymous> (nova-map-marker-field:1), <anonymous>:3:2975)

parelius avatar May 04 '20 19:05 parelius

@parelius Awesome, thanks for the update .... I will take a look soon, hopefully over the next few days.

mikebronner avatar May 04 '20 20:05 mikebronner

Any news here?

parelius avatar Jan 12 '21 10:01 parelius

Same problem here... I guess it is related with this issue on the "leaflet-geosearch" library: https://github.com/smeijer/leaflet-geosearch/issues/167

gregoriohc avatar Jul 08 '21 18:07 gregoriohc