Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- var $candies = 0;
- function menuMap()
- {
- $('#map').touchPanView({
- width: $(window).width(),
- height: $(window).height()
- });
- if(userName != null)
- {
- $.mobile.loading('show');
- $.post("http://sarg.lt/app/event_map.php", {name: userName, token: userData["token"], last_size: $candies, code: "0ay3j5as1Zua55f9T9s2upo"}, function (data) {
- $.mobile.loading('hide');
- if (data == "0")
- {
- showWarningMsg("Serveris nepasiekiamas!");
- return;
- }
- else if (data == "-1")
- {
- showWarningMsg("Autorizacijos klaida!");
- return;
- }
- else
- {
- var value = parseINIString(data);
- if($candies < value["size"])
- {
- $candies = value["size"];
- var pins_array = [];
- for (var i = 1; i <= value["size"]; i++) {
- pins_array.push({
- x: value["place" + i + "_0"],
- y: value["place" + i + "_1"],
- point: 'center',
- href: 'showMsg("Saldainis gautas iš ' + value["extraid" + i] + ' namo")'
- });
- }
- $('#contentMenu4').empty();
- $('#contentMenu4').prepend('<img id="map" src="images/map.jpg" alt="map" width="1200" height="1200" />');
- $('#map').touchPanView({
- width: $(window).width(),
- height: $(window).height() - 60,
- pins: pins_array,
- pinDefaults: {}
- });
- }
- }
- });
- }
- }
Add Comment
Please, Sign In to add comment