Comments (4)
If you use it offline you could just add
if ( google.maps ) {
// the plugin code here
}
About "initialize the plugin manually" - I need more explanation.
Original comment by johansalllarsson
on 24 May 2011 at 5:20
- Added labels: Priority-Low, Type-Enhancement
- Removed labels: Priority-Medium, Type-Defect
from jquery-ui-map.
I meant that the code in jquery.ui.map.js that extends $.fn and creates the
ui.gmap object should only be executed when the client code calls some init()
method, rather than being wrapped in a self-executing function. Otherwise it
can throw a reference error on startup because google and google.maps are
undefined, and can break unrelated click, rightclick, dblclick, etc. event
handlers in the application because of the reference to google.maps.MVCObject
in addEventListener.
I understand that a user of the library can modify the source file as needed to
put in the needed checks, but ideally, library code should not easily break
unrelated functionality. Deferring the plugin initialization to a manually
called method would allow client applications to avoid these problems.
Original comment by [email protected]
on 24 May 2011 at 5:46
from jquery-ui-map.
[deleted comment]
from jquery-ui-map.
You are correct that the plugin shouldn't break any jquery core events if you
are missing the google maps source. Thanks for pointing this out :). I've fixed
that in the trunk. With this fix there is no need for any init method.
Original comment by johansalllarsson
on 25 May 2011 at 3:28
- Added labels: Type-Defect
- Removed labels: Type-Enhancement
from jquery-ui-map.
Related Issues (20)
- Is this plugin actively supported?
- InfoWindow does not open when marker is clicked in IE8 only.
- Find not working as it should
- Filter options issue IE 8 HOT 2
- auto centering
- complete beginner
- jQM 1.3.1 w/ jQuery 1.9.1 not loading map HOT 1
- Call function to change center and zoom of maps HOT 1
- Firefox (Mac os X) right click always trigger zoom out
- Dealing with the scrollwheel option HOT 1
- Map is not movable on Windows 8 tablet.
- load from json and clustring HOT 2
- Conflict with jeegoocontext Plugin
- Error showing control buttons. HOT 1
- Source code - jQuery Mobile example
- Cannot read property 'apply' of undefined
- Map zoom out when updating with new location
- Setup a journey description with only a zip code not possible
- Can you use OS grid references or Eastings/Northings?
- Iam not able to run Google map method.
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 jquery-ui-map.