milosev.com
  • Home
    • List all categories
    • Sitemap
  • Downloads
    • WebSphere
    • Hitachi902
    • Hospital
    • Kryptonite
    • OCR
    • APK
  • About me
    • Gallery
      • Italy2022
      • Côte d'Azur 2024
    • Curriculum vitae
      • Resume
      • Lebenslauf
    • Social networks
      • Facebook
      • Twitter
      • LinkedIn
      • Xing
      • GitHub
      • Google Maps
      • Sports tracker
    • Adventures planning
  1. You are here:  
  2. Home
  3. JavaScript

How To Prevent jQuery UI Slider Overlap In jQueryUI

Details
Written by: Stanko Milosev
Category: jQuery
Published: 16 August 2012
Last Updated: 16 August 2012
Hits: 5680

Easy :)

 $( "#range" ).slider({
            range: true,
            min: 0,
            max: 100,
            values: [ 50, 60 ],
            step: 10,
            slide: function( event, ui ) {
                if (ui.values[0] == ui.values[1]) { /*checks for the values and compares*/
                    return false;
                }
            }

From here

Retrieving the dateFormat from jQuery UI datepicker and formating date

Details
Written by: Stanko Milosev
Category: jQuery
Published: 15 August 2012
Last Updated: 15 August 2012
Hits: 4205
  alert($.datepicker._defaults.dateFormat);
  var strMyDate = $.datepicker.formatDate($.datepicker._defaults.dateFormat, new Date(2007, 1 - 1, 26));
  alert(strMyDate);

Taken from here.

Disappearing polylines

Details
Written by: Stanko Milosev
Category: Bing Maps AJAX Control, Version 7.0
Published: 16 August 2013
Last Updated: 30 November -0001
Hits: 4765

It seems that there is one more bug. Polylines are disappearing if they are too big (i.e polyline which connects London with Sardinia) and if you zoom it.

Example you can see here, just zoom one line, zoom it until it disappears.

Also, in that file you can see example of adding viewchangeend event, which is fired also when zoom changes:

Microsoft.Maps.Events.addHandler(myMap, 'viewchangeend', addPins);

Then adding polylines:

var point1 = new Microsoft.Maps.Location(55, -2);
var point2 = new Microsoft.Maps.Location(52, -2);
var point3 = new Microsoft.Maps.Location(53, -1);
var point4 = new Microsoft.Maps.Location(37.996162679728116, 8.701171874999998);
var point5 = new Microsoft.Maps.Location(49.26780455063754, 8.701171874999998);

var positions = new Array(
	point1
	,point2
	,point3
	,point4
	,point5
);

var poly = new Microsoft.Maps.Polyline(
	positions);

myMap.entities.push(poly);

Memory leak

Details
Written by: Stanko Milosev
Category: Bing Maps AJAX Control, Version 7.0
Published: 16 August 2013
Last Updated: 16 August 2013
Hits: 4789

It seems that adding and removing pushpins leads to memory leak.

Example you can see here, in Chrome click shift + esc to see memory consumption.

Also, in that example you can see how to add or remove pushpins:

 

point = new Microsoft.Maps.Location(getRandomInRange(-180, 180, 3), getRandomInRange(-180, 180, 3));
pin = new Microsoft.Maps.Pushpin(point, {
	text: ('p')
});

myMap.entities.push(pin);
  1. Bing maps
  2. One example of displaying circle on google maps
  3. ko.observableArray
  4. Knockout debug

Subcategories

Ajax

JavaScript

ExtJS


jQuery

Bing Maps AJAX Control, Version 7.0

Knockout

Jasmine

Moment

node.js

Page 14 of 24

  • 9
  • 10
  • 11
  • 12
  • 13
  • 14
  • 15
  • 16
  • 17
  • 18