Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Map options not taking effect #15

Closed
mikeconstable opened this issue Jan 21, 2015 · 6 comments
Closed

Map options not taking effect #15

mikeconstable opened this issue Jan 21, 2015 · 6 comments

Comments

@mikeconstable
Copy link

Hi,

I've been using a basic autoform-map successfully (thanks!), however I can't seem to get any changes from adding map options. Example below is ensuring searchBox is turn off, but the search box is always rendered (I know it is supposed to be off by default):

{{#autoForm id="viewUserProfile" schema="Schema.User" doc=currentUser type="readonly"}}
{{> afQuickField name="profile.location" width="125px" height="75px" searchBox=false zoom=4 label=false}}
{{/autoForm}}

screen shot 2015-01-21 at 09 55 51

Also not had luck trying to include other API options such as 'disableDefaultUI'. Can you provide a simple example or are they not possible as it stands?

@yogiben
Copy link
Owner

yogiben commented Jan 23, 2015

Try adding them in the schema (like the readme examples).

Right now, you cannot pass any google maps options directly. This would be good.

@mikeconstable
Copy link
Author

Thanks for your response, however, just tried adding them to the schema but it's not changing the map, other than for the options listed. Cannot get the googleMap options to take. I'll investigate a direct google map API instance and read coordinates from the DB instead. I only need to format a read-only map.

@rogueturnip
Copy link

I'm seeing the same issue. In addition if you create an update form the map is greyed out.

@mpowaga
Copy link
Collaborator

mpowaga commented Feb 19, 2015

Google Maps specific options can be set using rendered callback.

@mikeconstable
Copy link
Author

Thanks. Is there an example anywhere? I've tried setting a callback for rendered with some options but it had no effect - which means I'm likely doing it wrong.

@mpowaga
Copy link
Collaborator

mpowaga commented May 12, 2015

It's mentioned in the readme. Here's example:

Schemas.Locations = new SimpleSchema({
  title: {
    type: String
  },

  place: {
    type: String,
    autoform: {
      type: 'map',
      afFieldInput: {
        rendered: function (map) {
          // Add custom options using 'map'
        }
      }
    }
  }
});

@mpowaga mpowaga closed this as completed May 12, 2015
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants