Permalink
Browse files

Missing options

  • Loading branch information...
1 parent 564fa47 commit 3eb1cb7b362162ba8043eb2a9264e879f7f1e2be @gigablah committed Jan 27, 2012
Showing with 6 additions and 5 deletions.
  1. +6 −5 source/mxn.streetdirectory.core.js
@@ -5,11 +5,11 @@ Mapstraction: {
init: function(element, api) {
var me = this;
if (SD) {
- this.maps[api] = new SD.genmap.Map(element);
-
+ this.maps[api] = new SD.genmap.Map(element, {});
+
EventManager.add(this.maps[api], 'click', function() {
- var location = this.maps[api].viewportInfo.lastCursorLatLon;
+ var location = me.maps[api].viewportInfo.lastCursorLatLon;
if ( location ) {
me.click.fire({'location': new mxn.LatLonPoint(location.lat, location.lon)});
}
@@ -56,13 +56,14 @@ Mapstraction: {
addControls: function( args ) {
var map = this.maps[this.api];
-
- if (!this.controls) {
+
+ if (!this.controls.length) {
if (args.zoom == 'large') {
this.controls = new CompleteMapControl();
}
else if (args.zoom == 'small') {
this.controls = new MediumMapControl();
+
}
if (this.controls) {
if (!args.pan) {

0 comments on commit 3eb1cb7

Please sign in to comment.