route_distances/staticmaps.py
def add_coords(self, new_coords, _type = "markers", color = "0x00ff0066"):
        """ Add coordinates to the current static map

        Adds a string to the parameters table containing a list of coordinates
        and variables describing how they should be drawn.

        Args:
            new_coords: A multidimensional array containing (longitude,
                latitude) pairs of coordinates.
            _type: A string describing what kind of visual will be drawn.
                Possible options include: markers, path, polygon.
            color: A string containing a 24-bit or 32-bit hex value that
                corresponds to the desired color.
        """

        if (_type == "markers"):
            new_parameters = "markers=color:%s|size:tiny" % color
        elif (_type == "path"):
            new_parameters = "path=color:%s|weight:5" % color
        elif (_type == "polygon"):
            new_parameters = "path=color:0x00000000|fillcolor:%s|weight:5" % color

        for coord in new_coords:
            new_parameters += "|%f,%f" % (coord[1], coord[0])

        self.parameters.append(new_parameters)
 Add coordinates to the current static map

        Adds a string to the parameters table containing a list of coordinates
        and variables describing how they should be drawn.

        Args:
            new_coords: A multidimensional array containing (longitude,
                latitude) pairs of coordinates.
            _type: A string describing what kind of visual will be drawn.
                Possible options include: markers, path, polygon.
            color: A string containing a 24-bit or 32-bit hex value that
                corresponds to the desired color.
        
Add coordinates to the current static map
Adds a string to the parameters table containing a list of coordinates
and variables describing how they should be drawn.
Add coordinates to the current static map Adds a string to the parameters table containing a list of coordinates and variables describing how they should be drawn .
def add_coords(self, new_coords, _type = "markers", color = "0x00ff0066"):
        if (_type == "markers"):
            new_parameters = "markers=color:%s|size:tiny" % color
        elif (_type == "path"):
            new_parameters = "path=color:%s|weight:5" % color
        elif (_type == "polygon"):
            new_parameters = "path=color:0x00000000|fillcolor:%s|weight:5" % color
        for coord in new_coords:
            new_parameters += "|%f,%f" % (coord[1], coord[0])
        self.parameters.append(new_parameters)
def add_coords ( self , new_coords , _type = "markers" , color = "0x00ff0066" ) : if ( _type == "markers" ) : new_parameters = "markers=color:%s|size:tiny" % color elif ( _type == "path" ) : new_parameters = "path=color:%s|weight:5" % color elif ( _type == "polygon" ) : new_parameters = "path=color:0x00000000|fillcolor:%s|weight:5" % color for coord in new_coords : new_parameters += "|%f,%f" % ( coord [ 1 ] , coord [ 0 ] ) self . parameters . append ( new_parameters )
Add coordinates to the current static map
Adds a string to the parameters table containing a list of coordinates
and variables describing how they should be drawn.
Add coordinates to the current static map Adds a string to the parameters table containing a list of coordinates and variables describing how they should be drawn .
""" Add coordinates to the current static map

        Adds a string to the parameters table containing a list of coordinates
        and variables describing how they should be drawn.

        Args:
            new_coords: A multidimensional array containing (longitude,
                latitude) pairs of coordinates.
            _type: A string describing what kind of visual will be drawn.
                Possible options include: markers, path, polygon.
            color: A string containing a 24-bit or 32-bit hex value that
                corresponds to the desired color.
        """
self
new_coords
A multidimensional array containing (longitude,
latitude) pairs of coordinates.
A multidimensional array containing ( longitude latitude ) pairs of coordinates .
_type
A string describing what kind of visual will be drawn.
Possible options include: markers, path, polygon.
A string describing what kind of visual will be drawn . Possible options include : markers path polygon .
color
A string containing a 24-bit or 32-bit hex value that
corresponds to the desired color.
A string containing a 24 - bit or 32 - bit hex value that corresponds to the desired color .