- Posts: 7
COMMUNITY FORUM
adding backend map to k2google map plugins
- Nurettin Acar
- Topic Author
- Offline
- New Member
Less
More
12 years 6 months ago - 12 years 6 months ago #63354
by Nurettin Acar
adding backend map to k2google map plugins was created by Nurettin Acar
hi i just write googlemap plugins for k2 and its works fine.
but when i want add lattitude and longitude coordinates for each item i should go
itouchmap.com/latlong.html and get coordinates
so i have smilar code like itouch map and i want to add this to backend .
i create backendmap.php with this codes so when i click points lat and lon fields get cooridinates with javascript.
i triyed with plugins xml file addfieldpath but its does not work ?
how can i add this backendmap.php to plugins backend section?
My free k2gmap plugin with demo is here
normaly backend is like that with normal form fielsd
but i want to do like form fields and with map
but when i want add lattitude and longitude coordinates for each item i should go
itouchmap.com/latlong.html and get coordinates
so i have smilar code like itouch map and i want to add this to backend .
i create backendmap.php with this codes so when i click points lat and lon fields get cooridinates with javascript.
i triyed with plugins xml file addfieldpath but its does not work ?
how can i add this backendmap.php to plugins backend section?
My free k2gmap plugin with demo is here
normaly backend is like that with normal form fielsd
but i want to do like form fields and with map
Please Log in or Create an account to join the conversation.
- Grigor Mihov
- Offline
- New Member
Less
More
- Posts: 16
12 years 6 months ago #63355
by Grigor Mihov
Replied by Grigor Mihov on topic Re: adding backend map to k2google map plugins
Unfortunately there is no way to load that without hacking the K2 core.
Please Log in or Create an account to join the conversation.
- Nurettin Acar
- Topic Author
- Offline
- New Member
Less
More
- Posts: 7
12 years 6 months ago - 12 years 6 months ago #63356
by Nurettin Acar
Replied by Nurettin Acar on topic Re: adding backend map to k2google map plugins
thank you. i just edit
administrator/components/com_k2/views/item/tmpl/default.php
and i call my php file like this
administrator/components/com_k2/views/item/tmpl/default.php
and i call my php file like this
Log in or Create an account to join the conversation.
- Nurettin Acar
- Topic Author
- Offline
- New Member
Less
More
- Posts: 7
12 years 6 months ago #63357
by Nurettin Acar
Replied by Nurettin Acar on topic Re: adding backend map to k2google map plugins
but in this backendmap.php i should get my plugins paremeters like
Log in or Create an account to join the conversation.
- macario
- Offline
- New Member
Less
More
- Posts: 2
12 years 6 months ago #63358
by macario
Replied by macario on topic Re: adding backend map to k2google map plugins
Hello!
I'm using your K2gmap plugin and it looks great!
Unfortunately I only can see a blue background, lattitude and longitude are OK, but it is like if I were in the middle of the ocean...
Any idea?
I'm using Joomla 2.5.3 and K2 2.5.5
Thanks!
I'm using your K2gmap plugin and it looks great!
Unfortunately I only can see a blue background, lattitude and longitude are OK, but it is like if I were in the middle of the ocean...
Any idea?
I'm using Joomla 2.5.3 and K2 2.5.5
Thanks!
Please Log in or Create an account to join the conversation.
- jorge mejia gallegos
- Offline
- Junior Member
Less
More
- Posts: 25
12 years 6 months ago #63359
by jorge mejia gallegos
Replied by jorge mejia gallegos on topic Re: adding backend map to k2google map plugins
Hello i have been trying to acomplish this my self, i wrote a little java script that i can add to the administrator/components/com_k2/views/item/tmpl/default.php and it would autopopulate your googlemap plugin fields for latitude and longitud
i think it works fine, but i have a little problem though, if the map is inside the tab it doesn't render properly and i have no idea how to fix this, maybe you know how to avoid this problem.
this is the javascript i used:
its just a simple google map with jquery to add the value to the lat/long fields
it would be great if this could be done just by installing the plugin, without having to modify aditional files though.
i think it works fine, but i have a little problem though, if the map is inside the tab it doesn't render properly and i have no idea how to fix this, maybe you know how to avoid this problem.
this is the javascript i used:
<script type="text/javascript" src="http://maps.google.com/maps/api/js?sensor=true"></script>
<script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/1.7.1/jquery.min.js"></script>
<script type="text/javascript">
function initialize(){
var latlng = new google.maps.LatLng(41.659,-4.714);
var options = {
zoom: 16,
center: latlng,
mapTypeId: google.maps.MapTypeId.SATELLITE
};
map = new google.maps.Map(document.getElementById("map_canvas"), options);
google.maps.event.addListenerOnce(map, 'click', function(event) {
marker = new google.maps.Marker({
map: map,
position: event.latLng,
draggable: true
});
$('#pluginsk2GmapGmapItemLat').val(marker.getPosition().lat());
$('#pluginsk2GmapGmapItemLon').val(marker.getPosition().lng());
google.maps.event.addListener(marker, 'drag', function() {
$('#pluginsk2GmapGmapItemLat').val(marker.getPosition().lat());
$('#pluginsk2GmapGmapItemLon').val(marker.getPosition().lng());
});
});
}
$(document).ready(function() {
initialize();
});
</script>
<div id="map_canvas" style="width:100%; height:300px"></div><br/>
its just a simple google map with jquery to add the value to the lat/long fields
it would be great if this could be done just by installing the plugin, without having to modify aditional files though.
Please Log in or Create an account to join the conversation.
- Nurettin Acar
- Topic Author
- Offline
- New Member
Less
More
- Posts: 7
12 years 6 months ago - 12 years 6 months ago #63360
by Nurettin Acar
Replied by Nurettin Acar on topic Re: adding backend map to k2google map plugins
hi macario
please install firebug on firefox and check center of the map coordinates if its blank its showing middle of the ocean. but if you add any coordinates it must be show correct point.
hi jorge mejia gallegos
i just search for without modifie k2 admin files but there is no solution for that?
even cant get plugins global field for map like default lat and default lon
please install firebug on firefox and check center of the map coordinates if its blank its showing middle of the ocean. but if you add any coordinates it must be show correct point.
hi jorge mejia gallegos
i just search for without modifie k2 admin files but there is no solution for that?
even cant get plugins global field for map like default lat and default lon
Please Log in or Create an account to join the conversation.
- macario
- Offline
- New Member
Less
More
- Posts: 2
12 years 6 months ago #63361
by macario
Replied by macario on topic Re: adding backend map to k2google map plugins
Hi!
I downloaded and installed again. Now it works like a charm.
Thank you very much!!
I downloaded and installed again. Now it works like a charm.
Thank you very much!!
Please Log in or Create an account to join the conversation.