#native_company# #native_desc#
#native_cta#

GIS Mapping with PHP; Part Two Page 5

By Simon Moss
on February 9, 2004

To use: $polygons = LoadMIF(“{filename}“);
You should get this:
map with house marker
There are some parts of these functions which do not seem to have any purpose
whatsoever. Just relax and don’t have a cow. In the greater scheme of things
all will become clear.
Ok, so now we have the outlne of PEI loaded into memory. We should ( in the
case of PEI ) have an array of 33 associative arrays containing all the information
we need to draw the map.

Putting PEI on the Map

The steps we need to take for drawing are:
  • Work out how big we want the final JPEG is going to be
  • Work out where the outline of PEI is to be centered
  • Work out the scale of the outline map
We’ll go straight the code which I’ll disect later:

1
|
2
|
3
|
4
|
5
|
6
|
7