jquery-ui-map

jquery-ui-map fit bounds with a polyline?

点点圈 提交于 2020-01-04 09:03:15
问题 I'm working on a mobile app using jQuery Mobile. I also you the plugin "jquery-ui-map" to do my map (that helped alot with display issues using only GMap with jQM). I'm able to add polyline on the map and it works just fine. But when I try to use the fitBounds method, it doesn't work. In fact, it zoom out alot. But not on my bounds. Here is my code : // Added some data, so you can understand the structure // of variable "plan" plan[0].lat_a = 45.4681; plan[0].lng_a = -73.7414; plan[0].lat_b =

Jquery google map plugin, adding event listeners

江枫思渺然 提交于 2019-12-30 11:02:14
问题 Can some one explain the meaning of the following code snippet ( jQuery.fn[name] ) found in the google jquery.ui.map plugin: jQuery.each(('click mousedown rightclick dblclick mouseover mouseout drag dragend').split(' '), function(i, name) { jQuery.fn[name] = function(a, b) { return this.addEventListener(name, a, b); }; }); And also how we could bind a callback function to the click event on a map object, I have tried the following but the event does not have the latLng attribute: $('#map

InfoWindows are not unique, google maps API v3, jquery mobile

China☆狼群 提交于 2019-12-12 05:56:44
问题 I have a simple program where I want the following to happen: Click "Add Some Markers to Map", will show 4 markers with the locations specified in the cityList array. Click on a marker and it will open up and infoWindow and display the corresponding index in the cityList array. So if you click on the marker corresponding to cityList[0] , it will show you "0" in the infoWindow. I can add the markers and add the infoWindows, but the content in the infoWindows are incorrect. First of all, they

how to: when marker is clicked - dim the map and show a big div instead of an infobox on top of the map with information

坚强是说给别人听的谎言 提交于 2019-12-11 08:33:16
问题 I have a Google Map with filterable markers and info-boxes containing simple information about each marker( when you click them ), but was wondering if this is possible: When you would click on a marker - instead of a default info-box a big div appears on top of the map with tabs which shows all the possible data I will provide about a marker via JSON ( images, links, pictures ). How would you approach about implementing this functionality? 回答1: In your loop to add markers, add something like

Add infoWindow to a map marker using jQuery mobile, google maps API v3

北城以北 提交于 2019-12-08 05:44:20
问题 I have a simple script that adds a marker on a map when you click a button using jQuery mobile and the Google Maps API v3. I want to add a basic infoWindow to that marker, so that when you click on it, it says "Hello World". This seems like it should be very easy, but I can't seem to get the syntax correct. I'm adding markers like this $('#map_canvas').gmap('addMarker', { 'position': chicago } ); and I can't seem to find any good examples where you also setup an infowindow when you also set

Add infoWindow to a map marker using jQuery mobile, google maps API v3

大城市里の小女人 提交于 2019-12-07 09:55:29
I have a simple script that adds a marker on a map when you click a button using jQuery mobile and the Google Maps API v3. I want to add a basic infoWindow to that marker, so that when you click on it, it says "Hello World". This seems like it should be very easy, but I can't seem to get the syntax correct. I'm adding markers like this $('#map_canvas').gmap('addMarker', { 'position': chicago } ); and I can't seem to find any good examples where you also setup an infowindow when you also set up the marker. Here is my code. If you save in the jquery-ui-map-3.0-rc\demos\ directory, then all the

Can not get multiple page jquery mobile working with google maps

倾然丶 夕夏残阳落幕 提交于 2019-12-02 14:41:07
问题 I have jQuery mobile working with google maps so that I can display one, stand alone page with a map that takes up the full screen. However, I can't figure out how to make a simple 2 page example where I have a button that takes me to the map. I'm very confused as to why there is javascript in the body tags on all of the examples. I've been trying to follow the examples here http://jquery-ui-map.googlecode.com/svn/trunk/demos/jquery-google-maps-mobile.html , but it is very hard to figure out

Can not get multiple page jquery mobile working with google maps

心不动则不痛 提交于 2019-12-02 10:17:39
I have jQuery mobile working with google maps so that I can display one, stand alone page with a map that takes up the full screen. However, I can't figure out how to make a simple 2 page example where I have a button that takes me to the map. I'm very confused as to why there is javascript in the body tags on all of the examples. I've been trying to follow the examples here http://jquery-ui-map.googlecode.com/svn/trunk/demos/jquery-google-maps-mobile.html , but it is very hard to figure out what is necessary just for the basic_map within all of the source HTML. I'm new to using jQuery and

Jquery google map plugin, adding event listeners

橙三吉。 提交于 2019-12-01 09:34:39
Can some one explain the meaning of the following code snippet ( jQuery.fn[name] ) found in the google jquery.ui.map plugin: jQuery.each(('click mousedown rightclick dblclick mouseover mouseout drag dragend').split(' '), function(i, name) { jQuery.fn[name] = function(a, b) { return this.addEventListener(name, a, b); }; }); And also how we could bind a callback function to the click event on a map object, I have tried the following but the event does not have the latLng attribute: $('#map_canvas').gmap().click(function(event) { alert(event.latLng); }); Thanks in advance. That snippet of code