<commit_before># coding: utf-8
from ElementBase import ElementBase
from ElementParameter import ElementParameter
from ElementValue import ElementValue
from  objc_util import *
import console

class OpenLocationinGoogleMaps(ElementBase):
	def __init__(self):
		self.status = 'running'
		self.output = None 
		self.params = []
		self.setup_params()
	
	def setup_params(self):
		self.params.append(ElementParameter(name='mapmode',displayName='Map Mode',display=True,type='list',value='standard',allowedValues=['standard','streetview']))
	
	def get_status(self):
		return self.status
		
	def get_input_type(self):
		return 'location'
	
	def get_output(self):
		return self.output
		
	def get_output_type(self):
		return None
		
	def get_params(self):
		return self.params
		
	def set_params(self, params = []):
		self.params = params
		
	def get_description(self):
		return 'Opens a location in the Google Maps app'
	
	def get_title(self):
		return 'Open Location in Google Maps'
		
	def get_icon(self):
		return 'iob:map_32'
		
	def get_category(self):
		return 'External App'
	
	def run(self, input=''):
		mapmodeparam = self.get_param_by_name('mapmode')
		url = 'comgooglemaps://?center=' + str(input.value['latitude'])+','+str(input.value['longitude']) + '&mapmode='+ mapmodeparam.value
		uia = ObjCClass('UIApplication').sharedApplication()
		if not uia.openURL_(nsurl(url)):
			console.alert(title='Error oppening App',message='Is Google Maps app installed?',button1='Ok',hide_cancel_button=True)
		self.status = 'complete'<commit_msg>added multiple list select option to parameter<commit_after># coding: utf-8
from ElementBase import ElementBase
from ElementParameter import ElementParameter
from ElementValue import ElementValue
from  objc_util import *
import console

class OpenLocationinGoogleMaps(ElementBase):
	def __init__(self):
		self.status = 'running'
		self.output = None 
		self.params = []
		self.setup_params()
	
	def setup_params(self):
		self.params.append(ElementParameter(name='mapmode',displayName='Map Mode',display=True,type='list',value='standard',allowedValues=['standard','streetview']))
		self.params.append(ElementParameter(name='viewmode',displayName='View Mode',display=True,type='list',value=None,allowedValues=['satellite', 'traffic', 'transit'],multipleAllowed=True))
	
	def get_status(self):
		return self.status
		
	def get_input_type(self):
		return 'location'
	
	def get_output(self):
		return self.output
		
	def get_output_type(self):
		return None
		
	def get_params(self):
		return self.params
		
	def set_params(self, params = []):
		self.params = params
		
	def get_description(self):
		return 'Opens a location in the Google Maps app'
	
	def get_title(self):
		return 'Open Location in Google Maps'
		
	def get_icon(self):
		return 'iob:map_32'
		
	def get_category(self):
		return 'External App'
	
	def run(self, input=''):
		mapmodeparam = self.get_param_by_name('mapmode')
		viewsparam = self.get_param_by_name('viewmode')
		
		
		url = 'comgooglemaps://?center=' + str(input.value['latitude'])+','+str(input.value['longitude']) + '&mapmode='+ mapmodeparam.value 
		
		if not viewsparam.value == None:
			url = url + '&views=' + viewsparam.value
		uia = ObjCClass('UIApplication').sharedApplication()
		if not uia.openURL_(nsurl(url)):
			console.alert(title='Error oppening App',message='Is Google Maps app installed?',button1='Ok',hide_cancel_button=True)
		self.status = 'complete'
{'fraction_non_alphanumeric': 0.12845907369647538, 'fraction_numerical': 0.002330323332362365, 'mean_word_length': 5.6038461538461535, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '2120607', 'n_tokens_mistral': 1194, 'n_tokens_neox': 1079, 'n_words': 241}