codeforamerica / fast_pass

Las Vegas Development Opportunity Finder
BSD 3-Clause "New" or "Revised" License
7 stars 4 forks source link

Look into using Google Maps API #39

Closed louh closed 11 years ago

louh commented 11 years ago

The city prefers Google Maps since Mapbox does not have a free tier they can use. They are likely to transition to Google in post-fellowship phase. It may not be too late to explore transitioning right now. Details here: https://developers.google.com/maps/

Another reason why Google Maps is preferable because the City knows that their ArcGIS data can play nicely with it, and we're not sure about its compatibility with MapBox. The ArcGIS link with Google Maps is here: http://google-maps-utility-library-v3.googlecode.com/svn/trunk/arcgislink/docs/examples.html

louh commented 11 years ago

Test of Google Maps API: http://bl.ocks.org/louh/6710256

louh commented 11 years ago

Angular directive library for Google Maps (turns out there is one for Leaflet too); http://nlaplante.github.io/angular-google-maps/#!/demo

louh commented 11 years ago

Another one: https://github.com/angular-ui/ui-map

louh commented 11 years ago

I've decided to use the Angular UI library because the nlaplante one is a little too limiting.

I've hit a wall on being able to communicate from the map to Angular, again. This time, the problem is slightly different from the using pure JavaScript as it appears that when the map is initialized through Angular, the usual map library functions are all somehow "entangled" within Angular scope world and I can't really get to it easily. The Angular UI library is supposed to be able to return click events, for example, so that I can grab the lat/lng point easily. (Outside of Angular, the workaround is to communicate through input fields tied to a model). My guess is it might be a bug in Angular UI itself.

I filed an issue here: https://github.com/angular-ui/ui-map/issues/25

I'm not sure the best direction to go from here. Rather than continuing to bang my head on this wall, I've filed this so that I can get some fresh eyes on it.

cc @rclosner @migurski Thoughts?

lovehandle commented 11 years ago

Will look at this today while I'm cooped up on a plane.

On Fri, Sep 27, 2013 at 3:25 PM, Lou Huang notifications@github.com wrote:

I've decided to use the Angular UI library because the nlaplante one is a little too limiting. I've hit a wall on being able to communicate from the map to Angular, again. This time, the problem is slightly different from the using pure JavaScript as it appears that when the map is initialized through Angular, the usual map library functions are all somehow "entangled" within Angular scope world and I can't really get to it easily. The Angular UI library is supposed to be able to return click events, for example, so that I can grab the lat/lng point easily. (Outside of Angular, the workaround is to communicate through input fields tied to a model). My guess is it might be a bug in Angular UI itself. I filed an issue here: https://github.com/angular-ui/ui-map/issues/25 I'm not sure the best direction to go from here. Rather than continuing to bang my head on this wall, I've filed this so that I can get some fresh eyes on it.

cc @rclosner @migurski Thoughts?

Reply to this email directly or view it on GitHub: https://github.com/rclosner/lv-dof/issues/39#issuecomment-25270466

louh commented 11 years ago

Update: Thanks to some stack tracing by @migurski it turns out that Angular 1.1.5 was dropping the data that the click event was supposed to give to it. the issue is that Angular-UI was developed to work with 1.2.0-rc2 of Angular, which is the latest unstable release. Rather than try to hack old Angular to work with Angular-UI we just updated the Angular library. Other than having to manually add the ngRoute module, this version bump in the Angular framework didn't seem to break anything else.

Closing this issue now, under the assumption that we can continue to move forward with Google Maps as the map provider for this application. Further issues with Google Maps, or with the Google Maps/Angular integration, will be opened in new issues.