Styling Google Map in Android -


i think know answer this, can style google map v2? style, mean using google maps api styled map wizard (http://gmaps-samples-v3.googlecode.com/svn/trunk/styledmaps/wizard/index.html) can used pull json styling data javascript api.

google seems have pulled off ingress, hoping there's way. can't seem find way suspect google using inside knowledge ingress. know sure?

to style map, call googlemap.setmapstyle() passing mapstyleoptions object contains style declarations in json format. can load json raw resource or string,in mapready() function ... after ading json call map ready function

 @override     public void onmapready(googlemap googlemap) {         mmap = googlemap;          try {             // customise styling of base map using json object defined             // in raw resource file.             boolean success = mmap.setmapstyle(                     mapstyleoptions.loadrawresourcestyle(                             this, r.raw.style_json));              if (!success) {                 log.e("mapsactivityraw", "style parsing failed.");             }         } catch (resources.notfoundexception e) {             log.e("mapsactivityraw", "can't find style.", e);         }     } 

define raw resource in /res/raw/style_json.json, containing json style declaration night-mode styling

you json following link https://mapstyle.withgoogle.com/


Comments

Popular posts from this blog

curl - PHP fsockopen help required -

HTTP/1.0 407 Proxy Authentication Required PHP -

c# - Resource not found error -