$offsetX = 88; $offsetY = 67; //to understand offsets, open just the frame in a new tab/window - pixels from top of window to top beginning of map image (the jpg) are $offsetX, and from left of window to left beginning of map are $offsetY $marker_radius = -14; //need to subtract this in positioning since otherwise top-left corner of marker (and not center) will come at the exact position of the location if (is_array($locations)) foreach($locations as $location){ if ($location["PlotAt"]){ echo ""; #echo "Dest".++$num.""; # Hitesh: Commented the text based marker which printed dest1, instead using an image. # The idea earlier was to be able to plot multiple locations, for e.g. a search result page: map all link. # so we could mark desk1...dest9 etc on the map and then show a legend # we can still do it with a marker like yahoo map does, i.e. a pin with a number in its head. # look at https://www.truliablog.com/wp-content/themes/trulia/images/map-marker-universe.gif for inspiration # the position of the pin can be fine tuned by changinf the $offsetX & Y above. echo ""; } } /* function to tranform a point at Z# level to any other level */ function getx($point,$zoom){ $return = round($point["BlockX"]/pow(3,3-$zoom)); $row = substr($point["MapName"],0,2); $return += ($row%3)*MAPWIDTH/3; return $return; } function gety($point,$zoom){ $return = round($point["BlockY"]/pow(3,3-$zoom)); $row = substr($point["MapName"],0,2); $return += ($row%3)*MAPWIDTH/3; return $return; } ?>