SproutCMS

This is the code documentation for the SproutCMS project

source of /sprout/views/map_widget.php

  1. <?php
  2. use Sprout\Helpers\Enc;
  3. ?>
  4.  
  5. <?php if (!empty($align)): ?><div class="<?php echo Enc::html($align); ?>"><?php endif; ?>
  6.  
  7. <div id="map_<?php echo Enc::html($unique); ?>" style="width: <?php echo Enc::html($width); ?>px; height: <?php echo Enc::html($height); ?>px;"></div>
  8. <script>
  9. var map_<?php Enc::js($unique); ?> = 'map_<?php echo Enc::js($unique); ?>';
  10. $(document).ready(function()
  11. {
  12. initMapWidget(map_<?php echo Enc::js($unique); ?>,
  13. <?php echo Enc::js($latlng['lat']); ?>,
  14. <?php echo Enc::js($latlng['lng']); ?>,
  15. <?php echo Enc::js($zoom); ?>,
  16. true
  17. );
  18. });
  19. </script>
  20. <?php if (!empty($align)): ?></div><?php endif; ?>
  21.