I want to openPopup behind search marker
See original GitHub issue<div v-for="marker in referOjectOptions" :key="marker.id">
<l-marker :lat-lng="[marker.lat, marker.lon]">
<l-popup>
{{ marker.projectNameTH }}
</l-popup>
</l-marker>
</div>
methods: {
search(event) {
const item = this.referOjectInput;
if (!item.lat && !item.log) {
return;
}
this.$refs.leafmap.mapObject.flyToBounds([[item.lat, item.lon]]);
// popup[item]Open ?
},
Issue Analytics
- State:
- Created 3 years ago
- Reactions:2
- Comments:14 (7 by maintainers)
Top Results From Across the Web
Leaflet Control Search: open Popup for search result
Search in order to search for markers (from a geoJson marker group) on my map – which works great. I only have one...
Read more >leaflet - moveToLocation and open Marker-Popup automatically
One simple thing that's wrong can be found in code above. Popup that is attached to layer can be opened only with .openPopup()...
Read more >Work with markers in Mapbox.js | Help
In this guide, we'll show how to add markers, customize them, and make them interactive with Mapbox.js. Think of this guide as a...
Read more >Adding the Searchbar to a map - WRLD3D
Adding the Searchbar to a map. Add a searchbar to the map. This example creates markers for each search result and opens a...
Read more >Documentation - a JavaScript library for interactive maps
marker.bindPopup(popupContent).openPopup();. Path overlays like polylines also have a bindPopup method. A popup can be also standalone:
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
@mikeu thank you for support ❤️
@maneewihok I watched that video, I see what you mean about having to click again. I can’t see anything in the portion of your code you’ve shared that might explain that though. It could be all sorts of things, such as if
this.referObjectInput
is somehow not set correctly after the first click.Here is a codesandbox demo that shows a simple version of what I think you are trying to accomplish, working correctly for me: https://codesandbox.io/s/marker-array-popup-0lkue?file=/src/App.vue
I hope that helps. Perhaps if you are still having trouble, you can create a demo yourself that reproduces the error. At this point, I suspect that you have a bug somewhere else in your application, but it is very hard to debug or guess at the cause without knowing what the code is doing.