Comments (12)
Alright, so I got this working yesterday.
Since it expands on the infoWindow, it supports the same events and options and acts the same way as the regular infoWindow.
Just by copying the directive for uiInfoWindow I was able to get it working.
I could make a pull request, for this, but it takes a dependency on InfoBubble, so don't know if that would break things.
Thanks for any feedback!
from ui-map.
Hi Dashue,
Good work! Sorry for not responding earlier. So is InfoBubble a seperate file dependency from InfoWindow?
As long as it doesn't error if the user doesn't want to use infobubble, it should be fine.
from ui-map.
Yes it is. Should the user have to include this if they want to use it or should the directive be smart enough to feature detect it and take care of it's dependency if it's needed?
from ui-map.
I will try to pull the source and create a pull request for the infobubble this weekend
from ui-map.
Sounds good!
The directive should just error if the user tries to use it without infobubble dependency downloaded. But it should come bundled with ui-map, I think.
from ui-map.
Having trouble getting it to run. Do you understand any of this?
PS F:\dev\ui-map> grunt
Running "jshint:files" (jshint) task
4 files lint free.
Running "karma:unit" (karma) task
INFO [karma]: Karma server started at http://localhost:9876/
INFO [launcher]: Starting browser Chrome
INFO [launcher]: Starting browser Firefox
INFO [launcher]: Starting browser PhantomJS
Fatal error: spawn ENOENT
PS F:\dev\ui-map> grunt server
Warning: Task "server" not found. Use --force to continue.
Aborted due to warnings.
from ui-map.
Sucks to be you right now lol.
Have you tried 'npm install phantomjs -g'?
if it still doesn't work after that try just pushing your code anyway and I'll take a peak.
Andy Joslin
from my mobile
On Sat, Jun 1, 2013 at 5:05 PM, Johan Nilsson [email protected]
wrote:
Having trouble getting it to run. Do you understand any of this?
PS F:\dev\ui-map> grunt
Running "jshint:files" (jshint) task4 files lint free.
Running "karma:unit" (karma) task
INFO [karma]: Karma server started at http://localhost:9876/
INFO [launcher]: Starting browser Chrome
INFO [launcher]: Starting browser Firefox
INFO [launcher]: Starting browser PhantomJS
Fatal error: spawn ENOENT
PS F:\dev\ui-map> grunt server
Warning: Task "server" not found. Use --force to continue.Aborted due to warnings.
Reply to this email directly or view it on GitHub:
#5 (comment)
from ui-map.
It actually did pull down phantomjs, im impressed (running on windows).
But alas, still the same problem.
The only thing i´ve added is the following, and i´m currently running it on my site without any hiccups so far:
app.directive('uiMapInfoBubble',
['ui.config', '$parse', '$compile', function (uiConfig, $parse, $compile) {
var infoBubbleEvents = 'closeclick content_change domready ' +
'position_changed zindex_changed';
var options = uiConfig.mapInfoBubble || {};
window.infoBubbleOptions = options;
return {
link: function (scope, elm, attrs) {
var opts = angular.extend({}, options, scope.$eval(attrs.uiOptions));
opts.content = elm[0];
var model = $parse(attrs.uiMapInfoBubble);
var infoBubble = model(scope);
window.infoBubbleOptions = opts;
if (!infoBubble) {
infoBubble = new InfoBubble(opts);
model.assign(scope, infoBubble);
}
bindMapEvents(scope, infoBubbleEvents, infoBubble, elm);
/* The info window's contents dont' need to be on the dom anymore,
google maps has them stored. So we just replace the infowindow element
with an empty div. (we don't just straight remove it from the dom because
straight removing things from the dom can mess up angular) */
elm.replaceWith('<div></div>');
//Decorate infoWindow.open to $compile contents before opening
var _open = infoBubble.open;
infoBubble.open = function open(a1, a2, a3, a4, a5, a6) {
$compile(elm.contents())(scope);
_open.call(infoBubble, a1, a2, a3, a4, a5, a6);
};
}
};
}]);
from ui-map.
Just gave it another try:
PS F:\dev\ui-map> grunt
Running "jshint:files" (jshint) task
4 files lint free.
Running "karma:unit" (karma) task
INFO [karma]: Karma server started at http://localhost:9876/
INFO [launcher]: Starting browser IE
WARN [watcher]: Pattern "F:/dev/ui-map/components/angular/angular.js" does not match any file.
WARN [watcher]: Pattern "F:/dev/ui-map/components/angular-mocks/angular-mocks.js" does not match any file.
WARN [watcher]: Pattern "F:/dev/ui-map/components/angular-ui-utils/modules/event/event.js" does not match any file.
INFO [IE 10.0 (Windows)]: Connected on socket id KBeNgzSSwjyRlH_DrrkT
IE 10.0 (Windows) ERROR
'angular' is undefined
at F:/dev/ui-map/ui-map.js:2
IE 10.0 (Windows): Executed 0 of 0 ERROR (0.043 secs / 0 secs)
Warning: Task "karma:unit" failed. Use --force to continue.
Aborted due to warnings.
Anything that pops out? I don´t seem to have a components folder, who creates that?
from ui-map.
I'm currently experiencing the same problem of @Dashue during installation too.
Running "jshint:files" (jshint) task
4 files lint free.
Running "karma:unit" (karma) task
INFO [karma]: Karma server started at http://localhost:9876/
INFO [launcher]: Starting browser Chrome
INFO [launcher]: Starting browser Firefox
INFO [launcher]: Starting browser PhantomJS
Fatal error: spawn ENOENT
from ui-map.
Please let me know if you make any progress on this. Really too bad that we can't contribute :/
from ui-map.
Bump, would really like to contribute this so as to standardize the logic being used. And possibly add on it, instead of just adding changes locally that other people won't be able to leverage
from ui-map.
Related Issues (20)
- map-event binder not taking arguments HOT 1
- Multiple call to a button function inside a uiMapInfoWindow HOT 4
- Clicks on map pins stops working after a bit HOT 4
- event $params returns an empty array HOT 1
- Translate ng-events to similar in Google Maps API
- map-closeclick is not working in Firefox 12 and IE 10
- Custom infoWindow
- Memory leak in directives for some use cases
- marker
- google is not defined HOT 4
- Support for drawing tools HOT 2
- https://angular-ui.github.io/angular-google-maps/ doesn't work
- Please close
- update map location (help) HOT 2
- Compatibility issues with Cordova for iOS HOT 1
- how to click a button to trigger the map to show out?
- showing ui-map in angular-modal-service shows error HOT 3
- Event when map is ready HOT 1
- angular ui-map, set map to fit markers bounds
- npmjs.com
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from ui-map.