question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Can't use same map in multiple pages

See original GitHub issue

I’m submitting a

  • any problem or bug report

For:

  • Android
  • iOS
@ionic-native/google-maps: 4.5.2
@ionic-native/core: 4.4.0

Current behavior: I want to use the same map on another page, my map instance lives in a provider. When I ionViewDidEnter, run the function this.mapCtrl.map.setDiv(document.getElementById('map')) and the map appear on the new page, but I can’t interact with it. I tried to run the this.mapCtrl.map.setAllGesturesEnabled(true) function but it didn’t work.

Expected behavior: The map should appear and I should be able to interact with it. I’ve used this technique a lot with the V1, because it was the best way I found for reusing the same map instance, but if someone has a better way of doing it I’m open !

Here is the link to the code example: https://github.com/simetin/reusable-map

Issue Analytics

  • State:closed
  • Created 6 years ago
  • Comments:8 (4 by maintainers)

github_iconTop GitHub Comments

2reactions
wf9a5m75commented, Jan 22, 2018

Fixed. Please resintall the plugin from the multiple_maps branch. 2012

0reactions
simetincommented, Jan 22, 2018

Good to know, but with the 2.1.0 version, I can’t click on a marker on iOS with the Ionic Wrapper. Do you guys know a workaround ?

Read more comments on GitHub >

github_iconTop Results From Across the Web

How To: Set up a page layout with multiple map frames that ...
Input the same data in both of the maps. To do this, navigate to the Map tab, and click Add Data. Select the...
Read more >
Cannot add the same map view to a page multiple times
Step 3: Add the same map view to the page multiple times · Structure > Block layout · Under Content > Place block...
Read more >
Side By Side Pages in Layout View? - GIS Stack Exchange
You cannot see multiple layouts with the out-of-the-box ArcGIS Desktop. ArcMap supports only a single layout. If you've seen it before I'd ...
Read more >
Multiple Leaflet maps on same page with same options
I used to deal with Open layers 2.13 and I had map.render(div); option every time I wanted to set map to another div....
Read more >
Having two maps at the same time : r/OwlbearRodeo - Reddit
Just hit the "Select Map" button and flip between the both of them in the same game/link. Having you/your players flip between two...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found