mikebronner / nova-map-marker-field

Provides an visual interface for editing latitude and longitude coordinates.
MIT License
131 stars 36 forks source link

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

Open recepgums opened 4 years ago

recepgums commented 4 years ago
MapMarker::make("Location")
                ->latitude('latitude')
                ->longitude('longitude')->searchProvider('openstreetmap'),

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

mikebronner commented 4 years ago

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.

recepgums commented 4 years ago

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

parelius commented 4 years ago

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.

mikebronner commented 4 years ago

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

parelius commented 4 years ago

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)
mikebronner commented 4 years ago

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

parelius commented 3 years ago

Any news here?

gregoriohc commented 3 years ago

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