Skip to content

Instantly share code, notes, and snippets.

@mcfdn
Created January 3, 2013 14:36
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save mcfdn/4443911 to your computer and use it in GitHub Desktop.
Save mcfdn/4443911 to your computer and use it in GitHub Desktop.
LiteMap documentation example 3
<?php
$map = new LiteMap_Container();
$map->setCenter(51.500152, -0.126236);
$locations = array(
'51.500152' => '-0.126236',
'51.512249182894756' => '-0.15815299440919262',
'51.52325165255695' => '-0.11283439089356762',
'51.47238304492127' => '-0.15883963991700512',
'51.49077068938746' => '-0.07232230593263012'
);
foreach($locations as $lat => $lng) {
$marker = new LiteMap_Marker($lat, $lng);
$marker->setTitle('Latitude: ' . $lat . ', Longitude: ' . $lng);
$marker->setDraggable(true);
$map->addOverlay($marker);
}
?>
<head>
<?php echo $map->getJs(); ?>
</head>
<body>
<?php echo $map->render(); ?>
</body>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment