Providence World Map (WIP)

Forum for game modifications and custom clients.

Re: Providence World Map (WIP)

Postby Frakked » Fri Jul 11, 2014 1:45 am

alloin wrote:
Frakked wrote:As for making it public... unlikely... unless I can work out a fee based access :) (teasing)

actually not a bad idea, ask silver for a subscription to the map, maybe i could work something out if ppl are interested :p


Pretty sure that would be against User Agreement somewere... deals struck in game are one thing... but access to a website in the Real World... is something else altogether...

So long as it's in-game currency... might work... idk... walking a fine line

Kwaad's got to respond first... and I have to produce...

Absolutely will need to be getting something to reveal what I've paid in time to reveal...

Probably why the effort failed... it was easy to give up tiles when folks were looking for a base... but after?

Think I prophesied this... earlier in the thread
Frakked
 
Posts: 423
Joined: Sat Aug 31, 2013 1:48 am

Re: Providence World Map (WIP)

Postby Silushun » Fri Jul 11, 2014 1:59 pm

IM pretty sure I could host the server for free. I know someone within my household who is a web/graphic designer he'd host it for me and for free no need to greed this for some Salem map tiles haha
Silushun
 
Posts: 92
Joined: Wed Aug 01, 2012 1:55 am
Location: United Kingdom

Re: Providence World Map (WIP)

Postby Feone » Fri Jul 11, 2014 2:01 pm

Eh, if costs and people ripping the map tiles for personal maps are an issue you could just put a few ads onto the page and transform the tiles just enough to make them useless for current mapping tools.
Last edited by Feone on Fri Jul 11, 2014 2:26 pm, edited 1 time in total.
Feone
 
Posts: 810
Joined: Tue Jan 01, 2013 8:38 pm

Re: Providence World Map (WIP)

Postby Procne » Fri Jul 11, 2014 2:05 pm

Hasn't Kwaad said already that he can provide hosting and bandwidth? He only needs someone to do the job as he doesn't have time himself.
Image
Procne
 
Posts: 3691
Joined: Mon Sep 03, 2012 11:34 pm

Re: Providence World Map (WIP)

Postby alloin » Fri Jul 11, 2014 3:02 pm

mapping a FULL worldmap is not a pleasant and easy task, it also takes a fair bit of your time, hence nobody wants to maintain one...

I have hosting & all scripts working with dynamic markers & a login system, i just can't be arsed to maintain it, unless i gain something out of it.
jorb wrote:all I see is misplaced machismo and a lot of very cheap talk. ^^

Darwat confirmed scrub!
User avatar
alloin
Customer
 
Posts: 3031
Joined: Wed Aug 01, 2012 1:33 am

Re: Providence World Map (WIP)

Postby imrielle » Sat Jul 12, 2014 5:12 am

JS for a map:
Code: Select all
var COORDSPP = 5.12;
var map;
var projection;
var cnames = new Array("/");
myProjection.prototype.fromPointToCoord = function(point) {return new Coord(COORDSPP*point.x, COORDSPP*point.y)};
myProjection.prototype.fromCoordToPoint = function(coord) {return new google.maps.Point(coord.x/COORDSPP, coord.y/COORDSPP);};
myProjection.prototype.fromLatLngToCoord = function(latLng) {return this.fromPointToCoord(this.fromLatLngToPoint(latLng))};
myProjection.prototype.fromCoordToLatLng = function(coord) {return this.fromPointToLatLng(this.fromCoordToPoint(coord))};

myProjection.prototype.fromLatLngToPoint = function(latLng) {
   var origin = this.worldOrigin_;
   var x = origin.x + latLng.lng() * this.pixelsPerLonDegree_;
   var y = origin.y + latLng.lat() * this.pixelsPerLatDegree_;
   return new google.maps.Point(x, y);
};

myProjection.prototype.fromPointToLatLng = function(point) {
   var origin = this.worldOrigin_;
   var lng = (point.x - origin.x) / this.pixelsPerLonDegree_;
   var lat = (point.y - origin.y) / this.pixelsPerLatDegree_;
   return new google.maps.LatLng(lat, lng);
};

function myProjection() {
   var MAP_RANGE = 51200;
   this.worldOrigin_ = this.fromCoordToPoint(new Coord(gup("x","0"),gup("y","0")));
   this.pixelsPerLonDegree_ = MAP_RANGE / 360;
   this.pixelsPerLatDegree_ = MAP_RANGE / 180;
};

function CoordMapType(tileSize) {
   this.tileSize = tileSize;
}

//Something with the overlay grid
CoordMapType.prototype.getTile = function(coord, zoom, ownerDocument) {
   switch(zoom) {
   case 9:
   default:
      var factor = Math.pow(2,(9-zoom))
      var div = ownerDocument.createElement('DIV');
      div.style.fontSize = '10pt';
      div.style.borderStyle = 'solid';
      div.style.borderWidth = '1px 0px 0px 1px';
      div.style.borderColor = '#222222';
      div.style.color = '#CCCCCC';
      div.innerHTML = "("+coord.x*factor+", "+coord.y*factor+")";
      div.style.width = this.tileSize.width + 'px';
      div.style.height = this.tileSize.height + 'px';
      return div;
      break;
   }
};

//Draw a button in the top right corner
function ButtonControl(map, title, html, func) {
   var controlDiv = document.createElement('DIV');
   var controlUI = document.createElement('DIV');
   var controlText = document.createElement('DIV');
   controlDiv.appendChild(controlUI);
   controlUI.appendChild(controlText);
   controlText.title = title;
   controlText.innerHTML = html;
   controlDiv.className = 'controlDiv';
   controlUI.className = 'controlUI';
   controlText.className = 'controlText';
   map.controls[google.maps.ControlPosition.TOP_RIGHT].push(controlDiv);
   google.maps.event.addDomListener(controlUI, 'click', func);
}


function initialize() {

   var myMapType = new google.maps.ImageMapType({
      tileSize: new google.maps.Size(100, 100),
      minZoom: 1,
      maxZoom: 9,
      zIndex: 0,
      getTileUrl: function(coord, zoom) {
         return 'https://googledrive.com/host/0B4fMn0hnHw64N1NiQVVyYUlwdGc/'+ zoom + '/tile_' + coord.x + '_' + coord.y + '.png';
      },
      isPng: true
   });

   projection = new myProjection();
   myMapType.projection = projection

   var mapOptions = {
      center: new google.maps.LatLng(0, 0),
      mapTypeControl: false,
      backgroundColor: '#555555',
      zoom: parseInt(gup("zoom","4")),
      streetViewControl: false
   };

   map = new google.maps.Map(document.getElementById("map_canvas"), mapOptions);
   map.mapTypes.set('myMapType', myMapType);
   map.setMapTypeId('myMapType');
   map.submap = parseInt(gup("map","1"));

   //addMarker();

   // GridControl
   new ButtonControl(map, "Grid Off/On", "Grid Off/On", function() {
      if (map.overlayMapTypes.getLength()) {
         map.overlayMapTypes.pop();
      }   else {
         map.overlayMapTypes.push(new CoordMapType(new google.maps.Size(100, 100)))
      }
   });
   
   // Location URL
   google.maps.event.addListener(map, 'bounds_changed', function() {
      coord = projection.fromLatLngToCoord(map.getCenter());
      url = "/"+
            "?x="+Math.round(coord.x*100)/100+
            "&y="+Math.round(coord.y*100)/100+
            "&zoom="+map.zoom;
      document.getElementById("location").innerHTML = url;
   });
}

//Get URL Parameter
function gup(name,dflt) {
   name = name.replace(/[[]/,"\\\[").replace(/[]]/,"\\\]");
   var regexS = "[?#&]"+name+"=([^&#]*)";
   var regex = new RegExp( regexS );
   var results = regex.exec( window.location.href );
   if( results == null )
      return dflt;
   else
      return results[1];
}

    google.maps.event.addListener(map, "click", function(event) {
        marker = new google.maps.Marker({
          position: event.latLng,
          map: map
        });
        google.maps.event.addListener(marker, "click", function() {
          infowindow.open(map, marker);
        });
    });


extend.js
Code: Select all
function extend(subClass, baseClass) {
   function inheritance() {}
   inheritance.prototype = baseClass.prototype;

   subClass.prototype = new inheritance();
   subClass.prototype.constructor = subClass;
   subClass.baseConstructor = baseClass;
   subClass.superClass = baseClass.prototype;
}

function Coord() {
   this.x;
   this.y;
}

function Coord(x,y) {
   this.x = x;
   this.y = y;
}

Coord.prototype.toString = function() {
   return "("+this.x+", "+this.y+")";
}


HTML:
Code: Select all
<!DOCTYPE html>
      <html>
      <head>
      <title>Stonewell</title>
      <meta name="viewport" content="initial-scale=1.0, user-scalable=no" />
      <link href="style/style.css" type="text/css" rel="stylesheet">
      <script type="text/javascript" src="http://maps.google.com/maps/api/js?sensor=false"></script>
      <script type="text/javascript" src="data/extend.js"></script>
      <script type="text/javascript" src="data/markers.js"></script>
      <script type="text/javascript" src="data/map.js"></script>
      </head>
      <body onload="initialize()">
         <div id="map_canvas"></div>
   <div id="location"></div>
      </body>
      </html>


Markers example:
Code: Select all
var markers = [
//Type/Name, Quality, X, Y, zIndex
   ['Ball Clay', 'Q27+', -3, 3, 9410],
   ['Acre Clay', 'Q22', -3, 4, 9510],
   ['Acre Clay', 'Q22', -3, 4, 9510]
];


Looks like: http://voleur.host22.com/map.php
Tiles: https://drive.google.com/file/d/0B4fMn0 ... sp=sharing (not including the zoom levels). You can find the scripting for zoomlevels elsewhere in this forum.

This was my private map. I was supposed to get a copy of Kwaad's tiles, but he had never PM'd me the link. This is no longer maintained (I don't currently play).
Image
User avatar
imrielle
Customer
 
Posts: 491
Joined: Sat Nov 10, 2012 5:57 pm
Location: Ohio, USA

Re: Providence World Map (WIP)

Postby KruskDaMangled » Sat Jul 12, 2014 8:11 am

alloin wrote:mapping a FULL worldmap is not a pleasant and easy task, it also takes a fair bit of your time, hence nobody wants to maintain one...

I have hosting & all scripts working with dynamic markers & a login system, i just can't be arsed to maintain it, unless i gain something out of it.


A feeling of satisfaction at having been useful? I don't think anyone is going to pay you cash money for the service, sadly.
KruskDaMangled
 
Posts: 553
Joined: Fri Mar 01, 2013 10:11 pm

Re: Providence World Map (WIP)

Postby alloin » Sat Jul 12, 2014 12:25 pm

KruskDaMangled wrote:
alloin wrote:mapping a FULL worldmap is not a pleasant and easy task, it also takes a fair bit of your time, hence nobody wants to maintain one...

I have hosting & all scripts working with dynamic markers & a login system, i just can't be arsed to maintain it, unless i gain something out of it.


A feeling of satisfaction at having been useful? I don't think anyone is going to pay you cash money for the service, sadly.

Image
jorb wrote:all I see is misplaced machismo and a lot of very cheap talk. ^^

Darwat confirmed scrub!
User avatar
alloin
Customer
 
Posts: 3031
Joined: Wed Aug 01, 2012 1:33 am

Re: Providence World Map (WIP)

Postby pestilence456 » Wed Aug 13, 2014 4:16 pm

Why markers don't work?
pls help how i can fix it?
pestilence456
 
Posts: 6
Joined: Mon Dec 03, 2012 3:12 pm

Re: Providence World Map (WIP)

Postby Doomer3003 » Sat Aug 16, 2014 3:17 pm

It's just too bad that the community is greedy like that...
Doomer3003
Customer
 
Posts: 22
Joined: Fri Jul 12, 2013 11:23 pm

PreviousNext

Return to Artifice & Arcana

Who is online

Users browsing this forum: smakaka and 1 guest