Skip to content
  • Map

    Use Map endpoints to get the simple map images of district boundaries.

    Get map image

    Request

    Elected Officials makes simple maps of district boundaries available through the map resource.

    Use the id property from a District object with this resource to request an image showing the shape of the district. The appearance of the map can be configured beyond the default style with graphical parameters.

    JSON and XML responses will contain the image as a data URI. Requests with format=image will return only the image.

    Cost: 1 credit

    Path
    district_idnumberrequired

    The id property from a District object.

    Query
    formatstring

    Specify the desired format of the response.

    Enum:"json""xml"
    Example:format=json
    customer_idstring, (password)required

    Required. The License Key issued by Melissa.

    Example:customer_id={REPLACE-WITH-YOUR-LICENSE-KEY}
    keystring, (password)deprecated

    The License Key issued by Melissa.

    widthnumber

    The width in pixels of the returned map image.

    heightnumber

    The height in pixels of the returned map image.

    fill_colorstring

    The color of the district's shape.

    fill_opacitystring

    The opacity of the district's shape.

    boundary_widthnumber

    The width of the district's outline.

    boundary_colornumber

    The color of the district's outline.

    boundary_line_joinstring

    The type of line joins for the district's outline.

    map_formatstring

    The format of the map image.

    Default:"png"
    Enum:"png""png8""png32""png256""jpeg"
    srsstring

    The EPSG code spatial reference system code for the map.

    Headers
    Acceptstringrequired

    Format of the response.

    Enum:"application/json""*/*"
    Example:*/*
    Content-Typestringrequired

    Format of the request.

    Enum:"application/json""application/xml"
    curl -i -X GET \
      'https://electedofficials.melissadata.net/v3.1/map/{district_id}?customer_id=%7BREPLACE-WITH-YOUR-LICENSE-KEY%7D' \
      -H 'Accept: */*' \
      -H 'Content-Type: application/json'

    Responses

    Successful response

    Body
    responseobject
    Response
    { "response": { "errors": [], "messages": [], "results": { … } } }