themc
Forum Replies Created
-
finnaly some progress.
it shows a bubble with the text found your location in firefox.
(using a fake location)
so far
here is the working script for anybody to try or upgrade. more help with this is appreciated.
sorry made an error below is the correct code.
the scripts load the page but its terribly slow. ill see if i can get somebody with the js exp to look at it.
i got a script build up.
its fully no errors should work but its not showing geolocation and the marker on the spot. maybe you guys can take a look.
i think where nearly there we just need somebody with js experience to alter this script and then i believe it will work.
il look into the link you posted. see if we can make it work. ill let you now.
ok im stuck at this. i tweeted the plugin creator Alexander Zagniotov to ask him for an update with geolocation.
ok for anybody who wants to know or get to my pint of procces on this thing.
i got the navigation to go but im stuck at displaying the marker on the map.
go to asstes/js and open cgmp.framework.min.js
at the bottom of the js add the following code.// Check if user support geo-location
if (navigator.geolocation) {
navigator.geolocation.getCurrentPosition(function(position) {
var latitude = position.coords.latitude;
var longitude = position.coords.longitude;
var geolocpoint = new google.maps.LatLng(latitude, longitude);var mapOptions = {
zoom: 8,
center: geolocpoint,
mapTypeId: google.maps.MapTypeId.HYBRID
}
// Place a marker
var geolocation = new google.maps.Marker({
position: geolocpoint,
map: map,
title: ‘Your geolocation’,
icon: ‘http://labs.google.com/ridefinder/images/mm_20_green.png’
});
});
}where the following code (last part of it should get a marker on screen at your location.. however its not wich means that getting the markers on the map comes from somewhere else.
// Place a marker
var geolocation = new google.maps.Marker({
position: geolocpoint,
map: map,
title: ‘Your geolocation’,
icon: ‘http://labs.google.com/ridefinder/images/mm_20_green.png’
});
});
}`the first part of the code however activates the gps for maps
but even then we need t put this plugin to load https://maps.googleapis.com/maps/api/js?v=3&sensor=true thats need for the marker to work.
according to sites the javascript should be from google so i added that js code to my javascript files.
this kinda code :
<script> // Load the map scripts google.load('maps', '3', {other_params:'sensor=true'}); // Function to create a map and check for geolocation function mapInit() { // Set the options to be used when creating the map var myOptions = { zoom: 0, center: new google.maps.LatLng(0, 0), mapTypeId: google.maps.MapTypeId.ROADMAP // Check if the browser supports geolocation if(navigator.geolocation) { navigator.geolocation.getCurrentPosition(currentPositionCallback); } else { alert('The browser does not support geolocation'); } } function currentPositionCallback(position) { // Create a new latlng based on the latitude and longitude from the user's position var user_lat_long = new google.maps.LatLng(position.coords.latitude, position.coords.longitude); // Add a marker using the user_lat_long position var marker = new google.maps.Marker({ position: user_lat_long, map: map }); // Set the center of the map to the user's position and zomm into a more detailed level map.setCenter(user_lat_long); map.setZoom(15); } google.setOnLoadCallback(mapInit); </script>[Please post code & markup between backticks or use the code button. Your posted code may now have been permanently damaged by the forum’s parser.]
is for html documents.but to make it work in the plugin it needs to be added to another file (like html would be added) i tried the php files but no good so far. also in assets / html some files still trying to get it to work do.
Forum: Plugins
In reply to: [Comprehensive Google Map Plugin] Mobile App for navigationthis topic is closed.
http://wordpress.org/support/topic/directions-to-current-google-latitude-location?replies=4
this is the topic i will continue on that topic.
progress is made so far on getting gps to work but im sill figuring out a way to get the zoom in on your location marker.
Forum: Plugins
In reply to: [Comprehensive Google Map Plugin] Fatal error after activate pluginfor the 2 of you do you host yourselfs or using webhosting ?
is so ask your provider for web for the php.ini memory settings.
and if possible a higher limit can be set ?
also what php version / combination of wordpress your using ?
Forum: Plugins
In reply to: [Comprehensive Google Map Plugin] how to disable the warning messageglad it works i hope the delition wont break any plugin material.
i made some progress this morning.
using:
http://ianluckraft.co.uk/2011/04/google-maps-v3-and-geolocation/
simply added the code for geo to the js scripts in assets.
now in google and safari and on mobile it says do you allow the app …. to use your location.
so far so good. next stop getting de marker to appear at the map and zoom in… its difficult for me cause i dont have the exp with js.
so its a lot of cut and past.
so far i used from what i found in the link at the bottom of the 2 framework files then it calls the gps from site / mobile device….
i think i need to search elsewhere to make it call a marker in the map anybody with js exp can take a look ?
Forum: Plugins
In reply to: [Comprehensive Google Map Plugin] how to disable the warning messagehello you could try the following but make a backup of the file first.
goto your plugins folder and enter the map from Comprehensive google map there go to assets then html. youll see the file for global error messages make a copy of this first (very important!!!) then delete it and see if it works … if not restore from the backup you made.
other then that you can try looking in the php files for this but since i dont want to mess up my main installation i can look for you on a test wordpress later.
anyway try the first method so we can see if it works or not.
cheers
themc
any progress on this? i got the feeling the this plugin support dies out…
i am looking into this gps thing myself maybe i can get the code from another script to build it into this one. i i succeed ill post the package here.Forum: Plugins
In reply to: [Comprehensive Google Map Plugin] Mobile App for navigationi got my app ready however still missing out on the function for location.
besides that i got a problem with the maps. your plugin is nice but it does not show all pins on the map. only some of them….. is there a limit to pins ?
indeed this would also solve my problem.