Is there a way to save offline google map on hybrid mobile app on ionic? -


i planning develop hybrid mobile app using ionic. 1 of features need offline google map. there way how it?

it depends on requirements of application whether possible. users on "modern" devices a.k.a html5 supported? users need view/edit map globally, or in specific area? map need provided google? i'll address issues below point in possible takes on problem.

do need google maps? (most optimal scenerio)
first of, need google maps? relevant: how far users need zoom maps? if can maps, , zooming not of high priority (if is, including map tiles make app eat storage), use map-tiles packaged part of app, , display them library http://leafletjs.com/. library documented, , provides map-interface variety of map-providers. do-able configure use own local map-tiles. include map-tiles multiple zoom levels if necessary, , limit min/max zoom-levels tiles have available. make maps work offline.

i can't or don't wan't provide own tiles make sure looked option, there systems out there provide map-tiles use (check https://www.mapbox.com/ example)
okay, don't want suggested. options now? javascript mapping-solutions typically render tiles based on location of map want see , zooming level. these tiles requested tile-provider. i do not know how implement google exactly, might need research on - i'll try see direction. there requests tiles servers. checked http://maps.google.com images loaded when trying navigate map: (example (click)). find out url's used in situation, need these kind of url's later (just inspect network tab in browser console , see requests made when scrolling in map). when need our users work in area when offline use service workers cache responses of these requests when online, , serve caches when offline. read more on service workers here (click).
advantage: real offline map-functionality tile visited before (as long cache wasn't overflown, depending on implementation of service workers, , service-worker supported browsers/devices).
disadvantages: no support tiles never put in cache (aka: never seen before). one: work devices support service workers. might option in situations either don't care users using "older" devices, or can control user's device choices. note using crosswalk ease developing efforts here, since have consider 1 browser-runtime then: crosswalk doesn't support older devices.
however: solution fine people need work in specific area, might true case provided @vipul-r if or users know in advance need maps work, can instruct/help them in loading & caching maps correctly.

if can't work on either of these 2 solutions, highly doubt there way it. don't see other way best of knowledge.


Comments

Popular posts from this blog

Magento/PHP - Get phones on all members in a customer group -

php - Bypass Geo Redirect for specific directories -

php - .htaccess mod_rewrite for dynamic url which has domain names -