Witaj Gościu! ( Zaloguj | Rejestruj )

Forum PHP.pl

> [php] google maps
northwest
post
Post #1





Grupa: Zarejestrowani
Postów: 788
Pomógł: 1
Dołączył: 17.09.2004

Ostrzeżenie: (10%)
X----


Witam ponownie (IMG:http://forum.php.pl/style_emoticons/default/winksmiley.jpg)
Wiecie może jak z poziomu php dodawać "zdalnie" ze swojej stronki obiekty do Google maps, i potem
je u siebie wyświetlać?? (chodzi o coś podobnego jak ma grono.net)


Z góry dzięki za pomoc,
Pozdrawiam ,
Northwest
Go to the top of the page
+Quote Post
 
Start new topic
Odpowiedzi
northwest
post
Post #2





Grupa: Zarejestrowani
Postów: 788
Pomógł: 1
Dołączył: 17.09.2004

Ostrzeżenie: (10%)
X----


aha :/
Pomożesz mi troszkę z tym??
Znalazłem 2 rzeczy które mnie interesują:
- http://code.google.com/apis/maps/documenta...arker-drag.html (ten "punkt" który daje
się przenosić)
- http://code.google.com/apis/maps/documenta...ing-simple.html - wyszukiwarka adresów
<script src="http://maps.google.com/maps?file=api&amp;v=2.x&amp;key=ABQIAAAAzr2EBOXUKnm_jVnk0OJI7xSosDVG8KKPE1-m51RBrvYughuyMxQ-i1QfUnH94QxWIa6N4U6MouMmBA" type="text/javascript"></script>
<script type="text/javascript">
var map = null;
var geocoder = null;

function initialize() { if (GBrowserIsCompatible()) {
map = new GMap2(document.getElementById("map_canvas"));
map.setCenter(new GLatLng(37.4419, -122.1419), 13);
geocoder = new GClientGeocoder();
}
}

function showAddress(address) {
if (geocoder) {
geocoder.getLatLng(
address,
function(point) {
if (!point) {
alert(address + " not found");
} else {
map.setCenter(point, 13);
var marker = new GMarker(point);
map.addOverlay(marker);
marker.openInfoWindowHtml(address);
}
}
);
}
}
</script>
<script src="marker-drag/maps" type="text/javascript"></script><script src="marker-drag/main.js" type="text/javascript"></script><style type="text/css" media="screen">.gmnoscreen{display:none}</style><style type="text/css" media="print">.gmnoprint{display:none}</style>
<script type="text/javascript">

function initialize() {
if (GBrowserIsCompatible()) {
var map = new GMap2(document.getElementById("map_canvas"));
var center = new GLatLng(37.4419, -122.1419);
map.setCenter(center, 13);

var marker = new GMarker(center, {draggable: true});

GEvent.addListener(marker, "dragstart", function() {
map.closeInfoWindow();
});

GEvent.addListener(marker, "dragend", function() {
marker.openInfoWindowHtml("Just bouncing along...");
});

map.addOverlay(marker);

}
}
</script></head><body onload="initialize()" onunload="GUnload()">

<form action="#" onsubmit="showAddress(this.address.value); return false">
<p>
<input type="text" size="60" name="address" value="1600 Amphitheatre Pky, Mountain View, CA" />
<input type="submit" value="Go!" />
</p>
<div id="map_canvas" style="width: 500px; height: 300px"></div>
</form>

</body></html>
[/html]


ale niestety przenoszenie punktu tylko działa - a wyszukiwanie nie (IMG:http://forum.php.pl/style_emoticons/default/sad.gif) (
Wiesz co trzeba jeszcze zrobić??

Dzięki WIELKIE za pomoc!!
Go to the top of the page
+Quote Post

Posty w temacie


Reply to this topicStart new topic
2 Użytkowników czyta ten temat (2 Gości i 0 Anonimowych użytkowników)
0 Zarejestrowanych:

 



RSS Aktualny czas: 11.10.2025 - 10:37