Personal Salem Map help

Ask and answer any and all questions pertaining to Salem's game-play.

Personal Salem Map help

Postby Bluestone » Tue Aug 07, 2012 5:33 am

Someone posted THIS CODE on the paradox-salem forums on 02-05-2012 with the instructions to make a file called map.html and insert the code on that link.
It works great but I am asking now if anyone knows how to add/alter that code or has a different one that allows zoom (even if it requires me to do some image editing I want to be able to zoom) AND also to add markers to the map to show my camp etc.

I have been trying to read up on how to do it myself but it all has me very confused so any help would be greatly appreciated.

EDIT: I want to use it on a local server so my wife can access it over the home network too, I have it set up in its current form but any suggestions/help would need to keep it as an html page.
Image
Don't forget to check out the Salem Wiki for all your salem information needs
User avatar
Bluestone
 
Posts: 177
Joined: Wed Aug 01, 2012 1:36 am
Location: New Zealand

Re: Personal Salem Map help

Postby Onionfighter » Tue Aug 07, 2012 6:05 am

Ok, I am not so great at reading code, but my interpretation is that you take the individual map files and use the google API to view them together.

If I am correct in this, then yes, it is possible to add markers (I had the code to do them manually, not by clicking or anything). To make different zoom levels, you will have to provide map tiles at the different zoom levels. I don't know of any way to do this without making new tiles.

Here is an example of code for a marker for v3 of the map api:

Code: Select all
var marker = new google.maps.Marker({
map:map,
position: new google.maps.LatLng(0,0),
title: "map center"
});
Onionfighter
 
Posts: 183
Joined: Wed Aug 01, 2012 7:24 am

Re: Personal Salem Map help

Postby APXEOLOG » Tue Aug 07, 2012 2:18 pm

To use different zooms on your map you should generate images for it. I cannot remember name format but it will be smth like tile_0_0-zoom1.png / tile_0_0-zoom9.png

To use marker and if you want them to be saveable on local server you will need some server-side code (or you can just hardcode them into html)
You can call me 'arh'. No needs to distort my nickname :)
User avatar
APXEOLOG
 
Posts: 222
Joined: Wed Aug 01, 2012 4:23 am
Location: Russia, Murmansk


Return to Help!

Who is online

Users browsing this forum: Tkhan and 12 guests