Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <div id="map_container"></div>
- <script type="text/javascript">
- mm = com.modestmaps;
- provider = new mm.ChitikaProvider();
- map = new com.modestmaps.Map('map_container', provider, new com.modestmaps.Point(290,200));
- <?php
- $i = 0;
- foreach($venues as $id=>$data) {
- ?>
- /* New way of creating the markers. This accurate and more precise than using the old method. */
- var html = '<img src="images/blue-pin-<?php echo($i); ?>.png" />';
- var loc = new mm.Location(<?php echo($data['lat']); ?>,<?php echo($data['long']); ?>); /* Marker location */
- var dimensions = new mm.Point(18, 26); /* Size of the marker/ */
- var f = new mm.Follower(map, loc, html, dimensions); /* Place marker on map*/
- <?php
- ++$i;
- }
- ?>
- /* Dont bother about this part. */
- map.setExtent(locations);
- map.setCenterZoom(map.getCenter(), 15);
- </script>
Add Comment
Please, Sign In to add comment