#!/usr/bin/env python
# coding=utf-8

import sys
import mapscript

mapObj = mapscript.mapObj()
mapObj.extent  = mapscript.rectObj(-117.623198,23.208206,
                                           -82.322650,46.182910)


mapObj.reference.status = mapscript.MS_ON
mapObj.reference.image = "data/reference.png"
mapObj.reference.extent = mapscript.rectObj(-117.623198,23.208206,
                                           -82.322650,46.182910)
mapObj.reference.color = mapscript.colorObj(-1,-1,-1)
mapObj.reference.outlinecolor = mapscript.colorObj(255,0,0)

print "Saving generated mapfile to [mapfile.map]"
mapObj.save("mapfile.map")
print "Saving generated reference map to [reference.png]"
img = mapObj.drawReferenceMap()
img.save("reference-out.png")
