Вход Регистрация
Файл: module-assets/admin/gmaps/examples/static_markers.html
Строк: 31
<?php
<!DOCTYPE html>
<
html>
<
head>
  <
meta charset="utf-8">
  <
title>GMaps.js &mdash; Static map with markers</title>
  <
script src="http://ajax.googleapis.com/ajax/libs/jquery/1.7.1/jquery.min.js"></script>
  <
script src="http://maps.google.com/maps/api/js?sensor=true"></script>
  <
script src="../gmaps.js"></script>
  <
link rel="stylesheet" href="http://twitter.github.com/bootstrap/1.3.0/bootstrap.min.css" />
  <
link rel="stylesheet" type="text/css" href="examples.css" />
  <
script>
    $(
document).ready(function(){
      var 
url GMaps.staticMapURL({
        
size: [610350],
        
lat: -12.043333,
        
lng: -77.028333,
        
markers: [
          {
lat: -12.043333lng: -77.028333},
          {
lat: -12.045333lng: -77.034size'small'},
          {
lat: -12.045633lng: -77.022color'blue'}
        ]
      });
      $(
'<img/>').attr('src'url).appendTo('#map');
    });
  </
script>
</
head>
<
body>
  <
h1>GMaps.js &mdash; Static map with markers</h1>
  <
div class="row">
    <
div class="span11">
      <
div id="map"></div>
    </
div>
    <
div class="span6">
      <
p>With GMaps.jsstatic map with markers is made this way:</p>
      <
pre>url GMaps.staticMapURL({
  
size: [610350],
  
lat: -12.043333,
  
lng: -77.028333,
  
markers: [
    {
lat: -12.043333lng: -77.028333},
    {
lat: -12.045333lng: -77.034size'small'},
    {
lat: -12.045633lng: -77.022color'blue'}
  ]
});

$(
'&lt;img/&gt;').attr('src'url)
  .
appendTo('#map');</pre>
      <
p>If no style attribute (like <strong>color</strong>, <strong>size</strong> or <strong>icon</strong>) is defined for a markerthe last one (or the default) will be used.</p>
    </
div>
  </
div>
</
body>
</
html>
?>
Онлайн: 2
Реклама