Hirdetés
Köszönjük a sok biztatást, támogatást! Egy rövid ideig még féláron tudsz hirdetni, előfizetni!
-
LOGOUT
JavaScript != Java (A JavaScript nem összekeverendő a Javával, két különböző programozási nyelvről van szó!)
Új hozzászólás Aktív témák
-
Sk8erPeter
nagyúr
Bocs, de korrigálnom kell magam, mert hülyeségeket beszéltem.
A v3-as verzióhoz valóban nem kell API-kulcs, én azt feltételeztem, a saját térképek helyes működéséhez kell, de kiderült, hogy csak a monitorozáshoz van extra haszna - na meg mondjuk az is tény, hogy pl. a Drupalnál vannak modulok, amikhez követelmény a Google v3-as API-kulcsa.
Még saját testreszabott térképek megjelenítését nem próbáltam API-kulcs nélkül, hogy úgy működik-e (az infók szerint kellene nekik).[link]
"Google Maps JavaScript API v3The Google Maps JavaScript API v3 does not require an API key to function correctly. However, we strongly encourage you to load the Maps API using an APIs Console key which allows you to monitor your application's Maps API usage. Learn how to use an APIs Console key."
A plugin honlapján egyébként ezt írják:
jQuery gMap:
"You need to use the Maps API V3 Javascript from Google, you can set the sensor parameter to true or false to detect the user's location, there's no need to generate an API key:"
De itt most csak arról beszél, hogy ahhoz nincs szükség API-kulcsra, hogy a felhasználó tartózkodási helyét tudd detektálni - az engedélyére viszont szükség lesz. Operában amúgy ez nem is működik.Na, de a lényegre térve: itt van egy elég jónak tűnő tutorial + demo: [link].
Meg itt v2-es API-t használva: [link].
DE a Gmap honlapján elég érthetők a példák, lásd a markers részt az options-ön belül: [link]options =
{
latitude: 47.58969,
longitude: 9.473413,
zoom: 10,
markers: [{latitude: 47.670553, longitude: 9.588479, html: "Tettnang, Germany"},
{latitude: 47.65197522925437, longitude: 9.47845458984375, html: "Friedrichshafen, Germany"}],
controls: ["GSmallMapControl", "GMapTypeControl"],
scrollwheel: false,
maptype: G_NORMAL_MAP,
html_prepend: '<div class="gmap_marker">',
html_append: '</div>',
icon:
{
image: "images/gmap_pin.png",
shadow: false,
iconsize: [19, 21],
shadowsize: false,
iconanchor: [4, 19],
infowindowanchor: [8, 2]
}
};Vagy másik példa: [link]
$("#map4").gMap({ markers: [{ latitude: 47.651968,
longitude: 9.478485,
html: "_latlng" },
{ address: "Tettnang, Germany",
html: "The place I live" },
{ address: "Langenargen, Germany",
html: "_address" }],
address: "Braitenrain, Germany",
zoom: 10 });Még bővebben:
$("#map4").gMap({ controls: false,
scrollwheel: false,
markers: [{ latitude: 47.670553,
longitude: 9.588479,
icon: { image: "images/gmap_pin_orange.png",
iconsize: [26, 46],
iconanchor: [12,46],
infowindowanchor: [12, 0] } },
{ latitude: 47.65197522925437,
longitude: 9.47845458984375 },
{ latitude: 47.594996,
longitude: 9.600708,
icon: { image: "images/gmap_pin_grey.png",
iconsize: [26, 46],
iconanchor: [12,46],
infowindowanchor: [12, 0] } }],
icon: { image: "images/gmap_pin.png",
iconsize: [26, 46],
iconanchor: [12, 46],
infowindowanchor: [12, 0] },
latitude: 47.58969,
longitude: 9.473413,
zoom: 10 });
Új hozzászólás Aktív témák
- Acer Aspire Vero - AV15 - 15.6"FHD IPS - i5-1235U - 16GB - 512GB - Win11 - 2+ év garancia
- Dell Latitude 5330 i3-1215U 6magos! - 16GB 512GB 13.3" FHD magyarbill 1 év garancia
- Dell Latitude 5330 i3-1215U 6magos! - 16GB 256GB 13.3" FHD magyarbill 1 év garancia
- Samsung Galaxy Watch 6 SM-R940 44mm Bluetooth Graphite okosóra eladó!
- HP ZBook Firefly 14 i7-1165G7 32GB 1000GB 14" FHD magyarbill 1 év garancia
Állásajánlatok
Cég: FOTC
Város: Budapest