• Visitors can check out the Forum FAQ by clicking this link. You have to register before you can post: click the REGISTER link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below. View our Forum Privacy Policy.
  • Want to receive the latest contracting news and advice straight to your inbox? Sign up to the ContractorUK newsletter here. Every sign up will also be entered into a draw to WIN £100 Amazon vouchers!

You are not logged in or you do not have permission to access this page. This could be due to one of several reasons:

  • You are not logged in. If you are already registered, fill in the form below to log in, or follow the "Sign Up" link to register a new account.
  • You may not have sufficient privileges to access this page. Are you trying to edit someone else's post, access administrative features or some other privileged system?
  • If you are trying to post, the administrator may have disabled your account, or it may be awaiting activation.

Previously on "Plotting map locations on a web page"

Collapse

  • Guest's Avatar
    Guest replied
    Re: hmmm,

    Latest lash up of the "Non-SKA" as of Friday night !

    server-web/torro/map/ukmap.asp

    suggestion are most welcome

    Leave a comment:


  • Guest's Avatar
    Guest replied
    Re: hmmm,

    If you select "Stu Test" and float the mouse over the yellow blobs you will see where the points should connect to.

    The issue in fact seems to be the formula and the base Map! I have my pal who is into Satellite image downloading and mapping of all things re work a formula where the map is referenced in the centre ( I think that it is currently bottom left) and also that fact that miles between LAT decrease as you move North – this involves a fair amount of SINE and COSINE calculations so I will leave it with him in this one.

    Also I need a base map that actually points North !!

    Leave a comment:


  • Guest's Avatar
    Guest replied
    Re: hmmm,

    Not really clear where points should be but is it something to do with the projection used?. As the faint lines indicate, x pixels represents significantly more degrees of longitude at bottom than at top.

    Pixels on the standard projection will be proportional to miles, but only approximately to lat/long and not even approximate as you get near the poles. That daft bugger upstairs made the world spherical unfortunately.

    Leave a comment:


  • Guest's Avatar
    Guest replied
    Re: hmmm,

    One BIG problem that I have is map alignment! If you enable "stu test" you will see that non of the points line up with key land mark features - think that really my map does not point true north!

    www.torro.org.uk/misc/map/ukmap.asp

    Leave a comment:


  • Guest's Avatar
    Guest replied
    Re: hmmm,

    Cracked it - it was the old double qoute thing.. now off ot bed

    Response.Write "<SPAN ID=""tornado"" STYLE=""******; top:320; left:285;"">"
    Response.Write "<IMG SRC=""Images/tn.bmp"" WIDTH=""16"" HEIGHT=""16"">"
    Response.Write "</SPAN>"

    Leave a comment:


  • Guest's Avatar
    Guest replied
    Re: hmmm,

    Right its 01:45 in the morning and I can see the light at the end of the tunnel. LOG LAT is converting correctly but I am stumped on some real basic ASP VB stuff that is ... escape char$ :\

    All I need to do is parse the following HTML line via a script write - but getting all the escape Char$ correct is killing me right now - how you programmer do this every day is beyond me are you all bald because I am pulling my hair out right now..

    This is what I need to write to the browser - as you can see planty of issues there..

    I need to write this to the browser via a Response.Write

    <SPAN ID="tornado" STYLE="******; top:520; left:385;">"
    <IMG SRC="Images/tn.bmp" WIDTH="16" HEIGHT="16">
    </SPAN>

    The ***** bit sould read ab solute - damm bad word filter again

    Leave a comment:


  • Guest's Avatar
    Guest replied
    Re: hmmm,

    Right off now to swot up on DHTML layers - somthing else that I have not delt with before

    Leave a comment:


  • Guest's Avatar
    Guest replied
    Re: hmmm,

    Frank you have really helped my out here as that formula was just the conversion that I needed. Now that I can convert LAT LON to pixels the rest should be easy - I will report back tomorrow some time with the first draft of the page

    BTW here is the formulafor the LON conversion.

    xpixels = Round(xpixelsleft + (xlon-xlatleft) * (xpixelsright - xpixelsleft) / (xlatright-xlatleft),0)

    Are you sure this was o-level ?? I dont recall it all

    Leave a comment:


  • Guest's Avatar
    Guest replied
    Re: hmmm,

    Why on earth is conversion to pixels difficult? That's basic O level mafs that applies to any scaling prob regardless of what increases in which direction and what the origins are, viz:

    ypixels = ypixelsbottom + (ylat-ylatbottom) * (ypixelstop - ypixelsbottom) / (ylattop-ylatbottom)

    Or have I misunderstood the question again?

    Leave a comment:


  • Guest's Avatar
    Guest replied
    Re: hmmm,

    Multimap is very good - I started using it on my campsite finder website (kwikbreaks) more or less when I first created it - within six months all the other buggers had copied me

    Leave a comment:


  • Guest's Avatar
    Guest replied
    Re: hmmm,

    I will certainly look at a conversion to pixels but one thought is that the 0,0 pixel is in the top right corner - sadly this does not tie in well with LOG / LAT as it would need to have it in the lower Right corner – so there would have to be some horrendous conversion going on there in order to convert it and I am not sure that I could do this … perhaps if I invert the LOG LAT values it might work…

    Any way thanks to fiddle’s tip/hint I managed to add multimap to my LOG /LAT finder tool. I am not actually a ASP programmer so I am using this a learning curve… which really means don’t over criticise my basic pages

    www.torro.org.uk/misc/lon...on-lat.asp

    Leave a comment:


  • Guest's Avatar
    Guest replied
    hmmm,

    convert the LAT LON values to pixels - do that and then use dhtml to create a layer with your symbols (as gifs) positioned on it. should be pretty straightforward(?)

    Leave a comment:


  • Guest's Avatar
    Guest replied
    Thanks for the reply Frank – Really this should be easy if I can just find the right direction to be pointed in..


    A sample map can be found here
    www.torro.org.uk/archive/ukmap.htm

    And the data set can be found here
    www.torro.org.uk/archive/

    So.. given the following data that I could query out of the database I.E.

    Event&nbsp &nbsp &nbsp &nbsp LAT&nbsp &nbsp &nbsp &nbsp LON
    WS&nbsp &nbsp &nbsp &nbsp 56.164&nbsp &nbsp &nbsp &nbsp -2.550
    TN&nbsp &nbsp &nbsp &nbsp 53.092&nbsp &nbsp &nbsp &nbsp -2.303
    TN&nbsp &nbsp &nbsp &nbsp 52.719&nbsp &nbsp &nbsp &nbsp -1.765
    TN&nbsp &nbsp &nbsp &nbsp 54.483&nbsp &nbsp &nbsp &nbsp -7.133
    TN&nbsp &nbsp &nbsp &nbsp 53.092&nbsp &nbsp &nbsp &nbsp -2.302

    I would want to place a symbol for a WS at 56.164 and -2.550 etc. A different query would return another set of values and hence different locations plotted on the map. The map image would always remain the same.

    I wonder if I were to some how convert the LAT LON values to pixels I could just use the old HTML MAP and put a blob on the map at the pixel location?

    Again any other suggestion would be really welcome at this stage.

    Leave a comment:


  • Guest's Avatar
    Guest replied
    Ooops - just realised you want multiple pins - my quick'n'dirty was for a single pin by using MultiMap

    Leave a comment:


  • Guest's Avatar
    Guest replied
    If the towns can be shown as reasonably simple shapes like circles or polygons etc. I suggest you take a look at Walter Zorn's freeware dhtml graphics package as he has done all the hard stuff for you. This is excellent.

    www.walterzorn.com

    If you want more complicated irregular areas that's a bit more difficult but possible using transparent gif images inside divs on a background map. Make them invisible and then change to visible when clicked on. You can also highlight areas using the jscript filters property.

    If you want some code examples I could bing a few on my webtulipe if you email me.

    Leave a comment:

Working...
X