Join the social network of Tech Nerds, increase skill rank, get work, manage projects...
 
  • Static Map in android

    • 0
    • 1
    • 0
    • 0
    • 0
    • 0
    • 0
    • 0
    • 564
    Comment on it

    Static Map in android

    Here I am writing a way to show static map on ImageView.
    Its image of map that displays on mobile without the help of any api key.

    Here we just make String url to add your latitute and longitute. like

    private double latitute = 30.3180;
    private double longitute = 78.0290;
     String mapUrl = "http://maps.google.com/maps/api/staticmap?center=" +latitude + "," + longitude + "&zoom=15&size=600x600&sensor=false";

    Here Google provide other parameters also to add in this url.

    zoom : This parameters take strings {horizontal_dimen*vertical_dimen}.

    scale : It affect the pixel numbers. scale = 2 has twice pixel as compared to scale = 1. Default is 1 , accepted are 2 and 4.

    format : It can be GIF,JPEG and PNG types.

    maptype : It can be roadmap,hybrid,satellite and terrain.

    marker : define one or more markers attached at any locations on map.Parameter separate by pipe(|)character if want multiple marker.

 0 Comment(s)

Sign In
                           OR                           
                           OR                           
Register

Sign up using

                           OR                           
Forgot Password
Fill out the form below and instructions to reset your password will be emailed to you:
Reset Password
Fill out the form below and reset your password: