Comments (6)
Update: This was in a jquery mobile app on Android. I am able to use
maps again in my app with jquery 1.7.2 and jqmobile 1.1.0. What worked
for me with jquery 1.6.4 had to be tweaked to work again. Nothing crazy
and nothing not already in Johan's docs, except maybe step 1.
1. trigger 'pageinit' event on the map page (is not the first page in app)
which creates the map, trigger is done from first app page 'pageinit' event
2. later in app, add marker, re-center map as usual then changePage to map page
3. refresh with :
$('#page-map').live("pageshow", function() {
$('#map_canvas').gmap('refresh');
});
It's kind of jumpy when going to the map page, but that could be from Android
+ jquery mobile.
This was part of upgrade from jquery mobile 1.0.1/jquery 1.6.4
to jquery mobile 1.1.0 / jquery 1.7.2.
Original comment by [email protected]
on 20 Apr 2012 at 12:16
- Changed state: Invalid
from jquery-ui-map.
Why does one of the 2 below don't work?
$('#location').gmap('option', 'zoomControlOptions', { style:
google.maps.ZoomControlStyle.SMALL, position:
google.maps.ControlPosition.TOP_RIGHT });
$('#location').gmap('option', 'zoomControlOptions', { 'style':
'google.maps.ZoomControlStyle.SMALL', 'position':
'google.maps.ControlPosition.TOP_RIGHT' });
What i'am doing wrong to appy the zoomControlOptions?
Original comment by [email protected]
on 7 Jun 2012 at 8:17
from jquery-ui-map.
Do you get any errors?
Did you try:
$('#location').gmap('option', 'zoomControlOptions', { 'style':
google.maps.ZoomControlStyle.SMALL, 'position':
google.maps.ControlPosition.TOP_RIGHT });
(quote the zoom control option names, don't quote the constants)
Original comment by [email protected]
on 7 Jun 2012 at 8:38
from jquery-ui-map.
[deleted comment]
from jquery-ui-map.
Ok, it's solved, I miss placed a some comment. for people that have the same
trouble, my final solution:
$('#location').gmap({
'center': hiddenLatitudeId + ',' + hiddenLongitudeId,
'disableDefaultUI': true,
'callback': function () {
var self = this;
self.addMarker({ 'position': hiddenLatitudeId + ',' + hiddenLongitudeId }).click(function () {
self.openInfoWindow({ 'content': 'Bark location provide content' }, this);
});
}
});
$('#location').gmap('option', 'mapTypeId', google.maps.MapTypeId.ROADMAP);
$('#location').gmap('option', 'streetViewControl', 'true');
$('#location').gmap('option', 'zoomControl', 'true');
$('#location').gmap('option', 'zoom', 15);
$('#location').gmap('option', 'zoomControlOptions', { 'style': google.maps.ZoomControlStyle.SMALL, 'position': google.maps.ControlPosition.TOP_RIGHT });
$('#location').gmap({ 'center': hiddenLatitudeId + ',' + hiddenLongitudeId, 'scrollwheel': true });
Original comment by [email protected]
on 11 Jun 2012 at 6:28
from jquery-ui-map.
Hi.. I use jQueru 1.8.2 and jQuery Mobile 1.2.0...I solved changing the
handler..
from:
$('#directions_map').live('pageinit', function() {
to:
$('#directions_map').live('pageshow', function() {
Original comment by [email protected]
on 18 Dec 2012 at 12:03
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.