Skip to main content

News

  • New version of Geooh Live published!

Topic: Overlays on offline maps (Read 51 times) previous topic - next topic

Overlays on offline maps
Hi, I'm a new user so forgive me if this is a known issue.  I have a .kml file of trails for a local park.  When using the default google maps the overlay loads and displays properly showing the trails overlaid on the map.  If I switch to an offline mapsforge map, I see the kml overlay briefly on the screen then the offline map gets displayed on top of the overly.  If I change scale or force a redraw I see the same - overlay is drawn then map on top. The overlay is there it's just hidden by the map.  I prefer the offline maps because I turn off data mode on the phone when out hiking.

I do use google maps for navigating some times and I've created a smallish offline google map area which gets saved to my phone.  It appears that Geooh has access to that data when I'm hiking with data mode turned off.  That's really nice!

I'm still learning the features and how to best use this program.  I'm looking forward to the new paid version.

Re: Overlays on offline maps
Reply #1
Thanks for reporting this!

It appears either Google's map software or Mapsforge is not honoring the KML z-index for map layers... I suspect it's most likely Google because a GeoJSON layer works fine with the Mapsforge map.

Is there any way you could convert the KML to GeoJSON? I could find no way to force the KML layer to render above the Mapsforge layer.

Re: Overlays on offline maps
Reply #2
Thanks for your quick response.  I converted the kml to geojson and it overlays the mapsforge map nicely.
I wondered why I saw the google logo on screen when using external maps.  I guess they show their brand if you use their software internally.

I now have several options for using offline maps:
Use kml/geojson and google maps and cache the location I want to explore beforehand.
Use kml/geojson and include the location in my google offline maps area.
Use geojson and mapsforge maps.

I prefer the kml options because they show the various trails in different colors.  It doesn't look like color is an option for geojson.

Thanks again for looking into this.

Re: Overlays on offline maps
Reply #3
I'm not an expert on GeoJSON, but I would have thought it allowed different polylines to have different colors.

There is some indication Google is working on improving the maps utility library Geooh uses to render KML overlays so hopefully they'll support KML z-index levels in the update.

Re: Overlays on offline maps
Reply #4
You know way more than I do.  The geojson spec didn't show any line styling, but there is a geojson CSS extension that provides it.  The two kml to geojson converters that I looked at didn't export line styles though.  I hand edited my file just to see if it would work.  It didn't with Geooh but it did with an online geojson viewer at http://geojson.io

I believe that support for this is optional and depends on the product. 

Re: Overlays on offline maps
Reply #5
Thanks for the research and feedback. I'll continue to search for a better way myself. Hopefully, Google will refresh their map software to better support KML.