Hello,
I've some geographical coordinates and I'd like to put them on a map.
Example: I've the map of the USA. Once I've selected Chicago, I'd like a
point-cross or what ever, on the Chicago point over the map.
How can this be done in PHP ?
I know you can do everything in GD, but does something similar already exist
?
Bob 8 2358
Message-ID: <44************ ***********@new s.sunrise.ch> from Bob Bedford
contained the following: Example: I've the map of the USA. Once I've selected Chicago, I'd like a point-cross or what ever, on the Chicago point over the map.
How can this be done in PHP ?
In image , as an input type will return the coordinates of the point
clicked. I think the simplest way would be with an absolutely positioned
transparent .gif, positioned according to the co-ordinates returned.
--
Geoff Berrow (put thecat out to email)
It's only Usenet, no one dies.
My opinions, not the committee's, mine.
Simple RFDs http://www.ckdog.co.uk/rfdmaker/
The way that I suppose is to use on of the form elements which is
called (input, type=image)
this element is considered as an image button, it allows you to click
on it (on the image) and then with submitting the form it submits the
coordinates of the image you are using
you can use it this way:
<form name="form1" method="get" action= "cityInfo.p hp" >
<input name="img" type="image" src="yourMap.jp g" >
</form>
On cityInfo.php page write the following:
$x = $_GET[img_x];
$y = $_GET[img_y];
By this way $x and $y will contain the coordinates of the exact point
that the user had clicked on it (in pixels of course)
I hope this will be what you needed
Have you looked into the Google Maps API? http://www.google.com/apis/maps/
Tom
Bob Bedford wrote: Hello,
I've some geographical coordinates and I'd like to put them on a map.
Example: I've the map of the USA. Once I've selected Chicago, I'd like a point-cross or what ever, on the Chicago point over the map.
How can this be done in PHP ?
I know you can do everything in GD, but does something similar already exist ?
Bob
"Tom" <kl******@gmail .coma écrit dans le message de news: 11************* *********@d56g2 00...legr oups.com...
Have you looked into the Google Maps API?
http://www.google.com/apis/maps/
Thanks for the info. Unfortunately, we think that google map will be a
paying service soon, so we don't want to create such service then have to
stop it because GoogleMap becomes paying.
Also What we need is exactly show a point on a map, not detect where the
user clicked.
Thanks for your message.
Message-ID: <44************ ***********@new s.sunrise.chfro m Bob Bedford
contained the following:
>Also What we need is exactly show a point on a map, not detect where the user clicked.
Umm...why are they not the same?
--
Geoff Berrow (put thecat out to email)
It's only Usenet, no one dies.
My opinions, not the committee's, mine.
Simple RFDs http://www.ckdog.co.uk/rfdmaker/
Umm...why are they not the same?
>
Cos he's got the latitude and longlitude and wants to convert that to
xy coords.
I am assuming that the lat/long is derived from a data source.
You need to convert that into xy coords for your map.
I would do this:-
Determine the lat/long of top-left and bottom-right of the map
Determine the width and height of the map in pixels
work out the xy coords by calculating degrees east and south of the
top-left corner. If you need minutes and seconds, remember you are
working in base 60!!!
display the main map in a <DIV>
Display the coordinate marker in another <DIVand position it relative
to the map DIV using and in-line style sheet; setting up the horizontal
and vertical offsets using PHP. If you are putting up more than one
marker you may need to manage the layer order of the DIVs as well.
This should display the map reference in the right place but you would
not be able to right click and save image as, because it is actually
two images..
frothpoker
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
Bob Bedford wrote:
Example: I've the map of the USA. Once I've selected Chicago, I'd like a
point-cross or what ever, on the Chicago point over the map.
How can this be done in PHP ?
With a clever mix of CSS and absolute positioning.
Let's suppose you have a HTML element (e.g. an <divtag with the map
inside) with known widht and height, and it is positioned relatively to the
document flow.
Then, a small <imgcontainin g a crosshair or whatever. You only have to
position it absolutely (where "absolute" means "relative to the top-left
corner of the first parent having absolute or relative positioning"), and
specify top anf left offset.
Try something like this:
<div class='containe r' style='position :relative; width:500px;
height:300px;'>
<img src='map.png' style='width:50 0px; height:300px;'/>
<img src='crosshair. png' style='position :absolute; left:129px; top:72px;'/>
</div>
After you have tested t works in the major browsers, then replace the offset
with the required values to put the crosshair in the desired place. I
suppose you know how to do that with PHP.
- --
- ----------------------------------
Iván Sánchez Ortega -i-punto-sanchez--arroba-mirame-punto-net http://acm.asoc.fi.upm.es/~mr/ ; http://acm.asoc.fi.upm.es/~ivan/
MSN:i_********* *************** *@hotmail.com
Jabber:iv****** ***@jabber.org ; iv*********@kde talk.net
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.3 (GNU/Linux)
iD8DBQFEqlkm3jc Q2mg3Pc8RAu+3AJ sFaRq7GXa95in0V 2WLHFJwtsq8UACf aM4t
QsAQh1B1og+MFuk q5ZDdqkQ=
=kSY0
-----END PGP SIGNATURE-----
Hello,
on 07/02/2006 06:23 AM Bob Bedford said the following:
"Tom" <kl******@gmail .coma écrit dans le message de news: 11************* *********@d56g2 00...legr oups.com...
>Have you looked into the Google Maps API?
http://www.google.com/apis/maps/
Thanks for the info. Unfortunately, we think that google map will be a
paying service soon, so we don't want to create such service then have to
stop it because GoogleMap becomes paying.
No, the Google Maps API is free for sites freely accessible to their users.
For premium (paying) sites or enterprise sites (sites only available in
a intranet) there is the Enterprise Google Maps. http://maps.google.com/support/bin/a...y?answer=26392
Also What we need is exactly show a point on a map, not detect where the
user clicked.
If you think you can use Google Maps API, you may want to try this forms
generation class that comes with plug-in for showing Google Maps in your
site. http://www.phpclasses.org/formsgeneration
Even if you just want to show a read only map, it simplifies the
generation of the all the map HTML and Javascript to point any locations
you want and for instance make them show an information window like for
instance in this example of the map of the PHP user groups in the United
States. http://www.phpclasses.org/browse/gro...ry/country/us/
--
Regards,
Manuel Lemos
Metastorage - Data object relational mapping layer generator http://www.metastorage.net/
PHP Classes - Free ready to use OOP components written in PHP http://www.phpclasses.org/ This thread has been closed and replies have been disabled. Please start a new discussion. Similar topics |
by: fausty |
last post by:
Hi,
I have a question.
I hope someone can help me. :-)
I'm writing an internet marketing application in php and I need to
import inside a mysql db all data about countries, district or
provinces, towns or cities, villages or other places of interest in
the world.
|
by: A.M |
last post by:
Hi,
We have special kind of service that covers just north on America (US and
Canada), so we want to redirect users comming from another country to
another page.
I am looking for a web service or similar thing that tells me the country
and state/province of incomming IP address. I am sure it is possible but i
don't know who sells that service.
|
by: Nick |
last post by:
hi, guys
I don't know where should I put this post, because this is a general
question, not really a c# question.
The question is how to caculate the real distance between two
geographical point? For example, i know two positions from my gps,
longitude and latitude. how to know to caculate how many miles between
these two points.
There are many websites doing this in search, enter the miles as
radius, and only show the results fall in...
|
by: torrance_bloke |
last post by:
Hi,
Does anyone know if DB2 has the capability to cluster in an
active/active mode over geographical distances.
I am aware of the replication tools and HADR capabilities but this is
more active/passive.
I know that the capability exists within the Oracle RAC product
|
by: steve |
last post by:
Hi All
I have textboxes within a TableLayoutpanel and I want to be able to position
an independant control adjacent to a selected textbox
This independent control allows selection of text to insert into the textbox
I am having trouble achieving this, see code below, the x position is too
far to the right and the y position is close to the bottom of the textbox
and I want it to be side by side.
| |
by: Elvey |
last post by:
Is there a URI scheme for (geographical) map or address location?
e.g. something like
postal-geographical:postal:123_Main_St,Anywhere_AW,USA
postal-geographical:geographical:lat:1234.567,long:987.654
defines an IANA-maintained registry of URI Schemes. These
registries include the Permanent and Provisional URI Schemes. The
registry is: http://www.iana.org/assignments/uri-schemes.html . I
find no such entry there.
|
by: Cainnech |
last post by:
Hi all,
I've got a bit of a challenge. I've got a script which displays the mouse coodinates if you click on an image. Now I would like to convert these coordinates to pixelnumber. Let me see if I can make it easier. Suppose we have an image which is 100px high and 100px wide.
The coordinates of the upper left corner would be x=0 and y=0
The coordinates of the upper right corner would be x=99 and y=0
The coordinates of the lower left...
|
by: rpupkin77 |
last post by:
Hey,
How does one going about their user's geographical location? Is that
even a PHP question.
For example, a site may say "Find others near Boston", but if you were
in New York, it would say "Find others in New York"
Thanks.
|
by: raylopez99 |
last post by:
keywords: logical coordinates, page coordinates, world coordinates,
device coordinates, physical coordinates, screen coordinates, client
coordinates. offset rectangle. WYSIWYG rubber rectangle problem,
bounded rectangle problem. PointToClient, PointToScreen
Beware this newbie trap for the unwary. It goes by various names (in
some old MFC literature I saw some of the keywords above). Whenever
doing comparisons between points,...
|
by: marktang |
last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look !
Part I. Meaning of...
|
by: Hystou |
last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it.
First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
| |
by: jinu1996 |
last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth.
The Art of Business Website Design
Your website is...
|
by: Hystou |
last post by:
Overview:
Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
|
by: agi2029 |
last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own....
Now, this would greatly impact the work of software developers. The idea...
|
by: isladogs |
last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM).
In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules.
He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms.
Adolph will...
|
by: conductexam |
last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one.
At the time of converting from word file to html my equations which are in the word document file was convert into image.
Globals.ThisAddIn.Application.ActiveDocument.Select();...
|
by: TSSRALBI |
last post by:
Hello
I'm a network technician in training and I need your help.
I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs.
The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols.
I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
| |
by: 6302768590 |
last post by:
Hai team
i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
| |