Permalink
Browse files

fixed issues #5 and #6

Signed-off-by: Martin Matysiak <kaktus621@gmail.com>
  • Loading branch information...
1 parent d31a72b commit 0fe421ffb8d8d4736dd7ac34caf7b76544ff17b5 @marmat committed Dec 29, 2011
Showing with 252 additions and 115 deletions.
  1. +28 −26 simplemarker/examples/basic.html
  2. +215 −83 simplemarker/src/simplemarker.js
  3. +9 −6 simplemarker/src/simplemarker.min.js
@@ -12,7 +12,7 @@
<script type="text/javascript">
function init() {
// create the basic map
- var jMap = new google.maps.Map(
+ var mapObj = new google.maps.Map(
document.getElementById('map'),
{
zoom: 12,
@@ -22,20 +22,21 @@
);
// create a simple marker with the default appearance
- new SimpleMarker(jMap, new google.maps.LatLng(50.7658, 6.1059));
+ new SimpleMarker({
+ map: mapObj,
+ position: new google.maps.LatLng(50.7658, 6.1059)
+ });
// create a simple marker with custom appearance
- var marker = new SimpleMarker(
- jMap,
- new google.maps.LatLng(50.7572, 6.1453),
- {
- id: 'myMarker',
- image: 'greendot.png',
- dimension: new google.maps.Size(48,48),
- anchor: new google.maps.Point(24,24),
- title: 'Simple, isn\'t it?'
- }
- );
+ var marker = new SimpleMarker({
+ map: mapObj,
+ position: new google.maps.LatLng(50.7572, 6.1453),
+ id: 'myMarker',
+ icon: 'greendot.png',
+ size: new google.maps.Size(48,48),
+ anchor: new google.maps.Point(24,24),
+ title: 'Simple, isn\'t it?'
+ });
// you can also add a click listener as usual
google.maps.event.addListener(marker, 'click', function() {
@@ -61,7 +62,7 @@
<div id="map" style="width:620px; height:500px"></div>
<pre>
// create the basic map
-var jMap = new google.maps.Map(
+var mapObj = new google.maps.Map(
document.getElementById('map'),
{
zoom: 12,
@@ -71,20 +72,21 @@
);
// create a simple marker with the default appearance
-new SimpleMarker(jMap, new google.maps.LatLng(50.7658, 6.1059));
+new SimpleMarker({
+ map: mapObj,
+ position: new google.maps.LatLng(50.7658, 6.1059)
+});
// create a simple marker with custom appearance
-var marker = new SimpleMarker(
- jMap,
- new google.maps.LatLng(50.7572, 6.1453),
- {
- id: 'myMarker',
- image: 'greendot.png',
- dimension: new google.maps.Size(48,48),
- anchor: new google.maps.Point(24,24),
- title: 'Simple, isn\'t it?'
- }
-);
+var marker = new SimpleMarker({
+ map: mapObj,
+ position: new google.maps.LatLng(50.7572, 6.1453),
+ id: 'myMarker',
+ icon: 'greendot.png',
+ size: new google.maps.Size(48,48),
+ anchor: new google.maps.Point(24,24),
+ title: 'Simple, isn\'t it?'
+});
// you can also add a click listener as usual
google.maps.event.addListener(marker, 'click', function() {
Oops, something went wrong.

0 comments on commit 0fe421f

Please sign in to comment.