Android-maps-utils: Add setOnFeatureClickListener on multiple GeoJSON

Created on 3 Jul 2018  路  6Comments  路  Source: googlemaps/android-maps-utils

I have 3 GeoJsonLayer in my code, and I want to set differents events to each layer, but when I define the last implementation of setOnFeatureClickListener the last implementation override the others layers.

How can i solve that?

bug

All 6 comments

Subscribed to this issue. I'm having the same issue but with KML files. May open a separate issue since technically our input formats our different. I'm lucky at least in that I only need to handle polygons which I think I can massage into Google's polylines.

I too was looking for a solution to this issue, but there doesn't seem to be one: https://stackoverflow.com/questions/44017057/android-google-maps-geojsonlayer-onfeatureclicklistener-multiple-layers

Only thing left would be to merge all files to a single one and go from there, just as in the example.

This issue has been automatically marked as stale because it has not had recent activity. Please comment here if it is still valid so that we can reprioritize. Thank you!

Still unsolved? :(

This issue has been automatically marked as stale because it has not had recent activity. Please comment here if it is still valid so that we can reprioritize. Thank you!

Thanks for the report! This was just fixed in the master branch by merging https://github.com/googlemaps/android-maps-utils/pull/380. There is a new MultiLayerDemoActivity in the master branch that demonstrates that multiple KML, GeoJSON layers now work on the same map!

Was this page helpful?
0 / 5 - 0 ratings

Related issues

Slake07 picture Slake07  路  3Comments

vardaan picture vardaan  路  6Comments

syedalibumpin picture syedalibumpin  路  5Comments

harold-hernandez30 picture harold-hernandez30  路  3Comments

edumucelli picture edumucelli  路  5Comments