Coder Social home page Coder Social logo

matt-jensen / ember-cli-g-maps Goto Github PK

View Code? Open in Web Editor NEW
58.0 58.0 31.0 2.57 MB

Deprecated Google Maps Addon

Home Page: http://matt-jensen.github.io/ember-cli-g-maps

License: MIT License

JavaScript 31.95% HTML 42.74% CSS 25.30%
ember ember-addon emberjs google-maps lazy-loading

ember-cli-g-maps's People

Contributors

3tarazona avatar bwbuchanan avatar cloke avatar devotox avatar ember-tomster avatar laulaman avatar llaman avatar locks avatar matt-jensen avatar mival avatar montoias avatar patrickberkeley avatar realityendshere avatar stevenwu avatar sukima avatar wbednarski avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar

ember-cli-g-maps's Issues

Addon is wrecking tests

The addon is working fine but it seems to be wrecking my acceptance tests.

not ok 43 PhantomJS 1.9 - TestLoader Failures: myproject/tests/acceptance/booking/edit/account-test: could not be loaded
    ---
        actual: >
            null
        message: >
            Died on test #1     at http://localhost:7357/assets/test-support.js:2934
                at http://localhost:7357/assets/test-support.js:6640
                at http://localhost:7357/assets/test-loader.js:31
                at http://localhost:7357/assets/test-loader.js:21
                at http://localhost:7357/assets/test-loader.js:40
                at http://localhost:7357/assets/test-support.js:6647: Could not find module `ember-cli-app-version/initializer-factory` imported from `myproject/initializers/app-version`
        Log: |

If I remove "ember-cli-g-maps": "0.3.2" from my code the tests start working again.

gMaps support for Route map element

  • Add support for rendering routes via the routes property on the component
  • Add binding to routes' step property to drive the route
  • Add tests for routes map children
  • Add documentation page under basic-usage/routes
    -- CRUD operations
    -- Styling
    -- Events (if any)

Error when pressing enter in Place Autocomplete field

How to reproduce:

  1. Go to https://matt-jensen.github.io/ember-cli-g-maps/#/place-autocomplete/index
  2. Type "NYC" into the autocomplete field
  3. Press enter

Observe in console:

Uncaught TypeError: Cannot read property 'location' of undefined
    at r.<anonymous> (https://matt-jensen.github.io/ember-cli-g-maps/assets/vendor-8ace701c1f2eb849adbb40f30eb4afd8.js:19:1382)
...

The problem is in the setup() function in g-autocomplete.js:

  setup(input) {
    const autocomplete = new google.maps.places.Autocomplete(input);
    const handler = Ember.run.bind(this, function() {
      const place = autocomplete.getPlace();
      this.sendAction('on-select', {
        lat: place.geometry.location.lat(),
        lng: place.geometry.location.lng(),
        place
      });
    });

This function is assuming that autocomplete.getPlace() always returns a place that has a geometry. However, if the user doesn't select a place from the dropdown, the return value of getPlace() contains only the "name" key with the content of the <input> element.

I'm not 100% sure what is the right thing to do here.

One possibility is to not fire the on-select event unless a place has actually been chosen from the dropdown. Another would be to resubmit the content of the input field into the maps AutocompleteService and use the first matching result, which is probably what the user intended.

Zoom as computed property causes stack overflow

In the controller, we have
zoom: Ember.computed('model.radius', {
get(key) {
let radius = this.get('model.radius');
return Math.round(14-Math.log(radius)/Math.LN2);
},
set(key, value) {
}
}),

We should follow the DDAU pattern.

Remove gMaps Service

Ensure that new gMap service method enhancements are shipped with this release.

Marker at Address

Is there way way to put a marker at a specific address? If not can support for this be added?

Document Basic Usage w/ Basic App

  • Top level g-map component properties
    • lat
    • lng
    • zoom
    • draggable
    • mapType
  • Setting Height
  • Supported Events
    • load
    • click
    • bounds_changed
    • center_changed
    • dblclick
    • drag
    • dragend
    • dragstart
    • heading_changed
    • idle
    • maptypeid_changed
    • mousemove
    • mouseout
    • mouseover
    • projection_changed
    • resize
    • rightclick
    • tilesloaded
    • tilt_changed
    • zoom_changed

Replace gMap service onLoad promise with new component action

The gMap service, as it stands, is complication of concerns that creates unneeded overhead which was originally designed for the use case of responding to a google map loaded event.

This use case is easily satisfied within the Ember convention of data down, action up by providing a loaded action on the component which will send the respective action with:

new Promise(function(resolve) {
    google.maps.event.addListenerOnce(googleMapInstance, 'idle', resolve);
});

This removes the unnecessary overhead and provides user with a means to respond once the Google Map has finished loading.

Remove GMaps

No one wants an Addon that requires bower dependencies and GMaps manages map children, which just isn't disco. Goals are to remove gmaps-for-apps.js and manage Google Map children as regular components.

  • Google Map component and factory module
  • Google Marker component
  • Google Circle component
  • Google Polygon component
  • Google Polyline component
  • Google Rectangle component
  • Google Overlay View component
  • Google InfoWindow component
  • Issue #76 - Bind g-autocomplete options
  • Issue #13 - remove gmap service
  • Separate version 1 documentation
  • Update README.md with simplified version 1 documentation
  • Remove GMaps app.import and update bower.json

_ember.default.String.singularize is not a function

Hi,

I am not sure if this module supports Ember 2.7.0 but it seems that Ember.String.singularize was removed in this version.

I get an error _ember.default.String.singularize is not a function when I include g-maps.

Google map theming

Check for gMaps support.
If not supported, implement on g-maps component.
Add Documentation.
Add Example on g-maps component property page.

Multiple markers possible?

Hi,

Is it possible to add multiple dynamically generated markers to a Google Map.
Like this (in ember-g-map addon):

{{#each markers as |marker|}}
    {{g-map-marker context lat=hotspot.lat lng=hotspot.lng }}
{{/each}}

The problem with the ember-g-map addon is that the markers aren't draggable.

gMap service addListenerOnce for google map instance loading

gMap service should provide an addListenerOnce method to listen for map load/registered event by map name.

For Example:

this.get('gMap').addListenerOnce('my-map-loaded', function() {
    console.log('yay');
});
this.get('gMap').addListenerOnce('my-map-registered', function() {
    console.log('boo boo boo');
});

This functionality should prevent the need for wrapping map event promises in callbacks of afterRender.

Lazy Load

I don't want to fetch google maps before it is needed. I can see in the source code that there is lazyLoad configuration options but the code is commented out. What's the status of lazy load functionality? Is this already working or if not then how can I help you in progressing with that?

marker event call controller's action

i want to pop up a modal (by toggle boolean property on controller) when double click marker, how to access controller's action by double clicking marker?

g-map Heatmap

  • What it is, what it does, when you should use it.
  • links to Google maps heatmap layer.
  • configuration in config/environment.js
  • required g-map property heatmapMakers
  • optional properties
    • radius
    • dissipating
    • opacity
    • gradient
    • visible

GMaps undefined

Hey I started getting this error recently and can't figure out why it is happening.

app.js:13 Error while processing route: index Cannot read property 'geocode' of undefined TypeError: Cannot read property 'geocode' of undefined
    at GMaps.geocode (http://localhost:4200/assets/vendor.js:74185:16)
    at http://localhost:4200/assets/vendor.js:135874:25
    at Object.initializePromise (http://localhost:4200/assets/vendor.js:67799:7)
    at new Promise (http://localhost:4200/assets/vendor.js:69651:21)
    at Class.geocode (http://localhost:4200/assets/vendor.js:135859:14)
    at Class._geocode (http://localhost:4200/assets/app.js:7340:35)
    at Class._lookup (http://localhost:4200/assets/app.js:7331:19)
    at Class._lookupCoords (http://localhost:4200/assets/app.js:7325:19)
    at tryCatch (http://localhost:4200/assets/vendor.js:67749:14)
    at invokeCallback (http://localhost:4200/assets/vendor.js:67764:15)

Has anyone seen anything like this?

Map in bootstrap modal

Hello, I'm trying to insert my map inside a modal but it doesn't appear.
I tried setting a var after x seconds when Modal is generated in view but it doesn't appear.

what i need to do?

thanks :)

Language configuration setting isn't appended to the script tag

I'm trying to force the map to use English as interface language, but this option is not inserted in the script tag.

ENV.googleMap = {
  version: '3', // not recommended
  protocol: '//', // default
  lazyLoad: false, // default
  language: 'en', // optional
  region: 'JA' // optional
}

Language and region settings doesn't seem to affect the script tag in any way

Uncaught typeErrors when using g-maps

Hi,

I just installed g-maps and used it in my hbs file:
{{g-maps lat=50 lng=5 zoom=12}}

This gives me some errors:
Uncaught TypeError: _.ef is not a function stats.js:5
Uncaught TypeError: _.oa is not a function util.js:32
Uncaught TypeError: _.oa is not a function common.js:208
Uncaught TypeError: this.S.removeAt is not a function stats.js:7
Uncaught TypeError: Cannot read property 'j' of undefined util.js:20
Uncaught TypeError: Cannot read property 'type' of undefined common.js:34

I have set the contentSecurityPolicy, I have set the API key and the css height.

g-map Selections w/ Examples

  • What it is, what it does, what it's repurposed from, when you should use it.
  • Links to Google maps drawing Managers.
  • g-map property selections is required
  • setting selection types (marker, polygon ect)
  • styling selection types
    • link to gist with selections styles themes
  • configuration in config/environment.js
  • optional selections properties
    • delay
    • mode
    • modes
    • position
  • Selections actions
    • marker
    • circle
    • rectangle
    • polygon
    • polyline
  • Example that draws all selections on map
  • Example of custom selections controls

Thank You Section In Readme

Identify the people + projects that made this possible:
ember-google-map
gmaps
countless others who shared their frustrations and solutions regarding google maps.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.